以横向+ A4模式保存RFT文件? [英] Save RFT file in landscape + A4 mode?
问题描述
我想在横向和A4尺寸模式下保存RichTextBox的内容,我找不到任何方法来更改这些设置,只需SaveFile()方法。如果有人可以传递一个想法,那就太棒了。
I want to save content of a RichTextBox in landscape and A4 size mode, I can''t find any method to change these settings, just SaveFile() method. If anyone can pass an idea, it''s great.
推荐答案
请提供更多信息。谢谢。
Please provide more information. Thanks.
我有一个RTB,我只想将它保存到.rtf文件,这很简单,只需调用RichTextBox.SaveFile(名称,类型)。但问题是我希望在横向和A4模式下有一个RTF文件,默认情况下它将通过Letter和纵向模式保存。
I have a RTB and I just want to save it to .rtf file, that''s easy just call RichTextBox.SaveFile(name,type). But the problem is I want to have a RTF file in Landscape and A4 mode, by default it will be saved by Letter and in Portrait mode.
我有一个RTB,我只想将它保存到.rtf文件,这很简单,只需调用RichTextBox.SaveFile(名称,类型)。但问题是我希望在横向和A4模式下有一个RTF文件,默认情况下它将通过Letter和纵向模式保存。
I have a RTB and I just want to save it to .rtf file, that''s easy just call RichTextBox.SaveFile(name,type). But the problem is I want to have a RTF file in Landscape and A4 mode, by default it will be saved by Letter and in Portrait mode.
我能想到的唯一方法是通过自动化打开Microsoft Word,然后打开文档,进行页面设置(通过代码),然后重新保存你的文件。凌乱,但它会工作。
这是一个Word自动化示例, http://support.microsoft.com/kb/316384
要对页面设置进行编码,请在Word中记录maco页面设置,然后将宏添加/转换为您的代码。
如果您想这样做并需要更多帮助,请回发。 HTH --Sam
The only way that I can think to do it is to open Microsoft Word via automation, then open your document, do a page setup (via code), and resave your document. Messy, but it would work.
Here''s a Word automation example, http://support.microsoft.com/kb/316384
To code the Page Setup, record a maco in Word that does the page setup and then add/translate the macro into your code.
If you want to go this way and need more help, just post back. HTH --Sam
这篇关于以横向+ A4模式保存RFT文件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!