| Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате |
| Форум программистов > Delphi: ActiveX/СОМ/CORBA > Как сохранить текст MS Word в другом формате? Open a new Application and place: Open a new Application and place: |
| Автор: Pakshin A. S. 10.11.2004, 20:12 | ||||||||||
| Open a new Application and place: a button named Button3, a RitchText object named WordEditor and an OpenDialog component. From now on, you can browse for any *.doc file and load it into the RitchText object. NOTE: Format:=6 instructs Word to save the file as RTF. Extension is not enough. Other File Formats: Argument Format File Format 0 Normal (Word format) 1 Document Template 2 Text Only (extended characters saved in ANSI character set) 3 Text+Breaks (plain text with line breaks; extended characters saved in ANSI character set) 4 Text Only (PC-8) (extended characters saved in IBM PC character set) 5 Text+Breaks (PC-8) (text with line breaks; extended characters saved in IBM PC character set) 6 Rich-text format (RTF)
How to prevent word from opening password-protected files or resume wizard files and sometimes causing application to hang ? The sollution is to add the folowing query before openning the document:
You can even preset the password propery as:
NOTE: If the above code generates an "Undefined property: ActiveDocument" change the:
with
|