I want to Make a wordfile into a .txt file.
Meaning save only its data without all the fontsize and stuff like that.
I have an option in word Saveas .txt file. How do I do that from VB?
FatMan
Printable View
I want to Make a wordfile into a .txt file.
Meaning save only its data without all the fontsize and stuff like that.
I have an option in word Saveas .txt file. How do I do that from VB?
FatMan
I am listening
Iouri Boutchkine
[email protected]
you are listening ?
what for?
I am not speaking....
FatMan
I think the easiest way would be to use the rich text box. The richtextbox has a loadfile property which you can load in the word document and it has a savefile method , which you can save as a text file.
rtb1.loadfile "myword.doc", rtfRTF
rtb1.savefile "mynewdoc,txt", rftText
You could set the visible property to false if you want it displayed on your form.
David Paulson
d.paulson's idea is workable but I think you will loose some information as RichTextBox is not that compatible with WORD format. You might wanna venture into using WORD ACTIVEX component which will allow you to open MS WORD itself and instruct it to open the specific file. Then you can perform TEXT file conversion by using MS WORD. Of course the catch is to have MS WORD installed on the PC running this program.
Just my two cents,
-Cool Bizs