Click to See Complete Forum and Search --> : Word To Text


Lev FatMan
May 9th, 2001, 10:46 AM
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

Iouri
May 9th, 2001, 11:06 AM
I am listening


Iouri Boutchkine
iouri@hotsheet.com

Lev FatMan
May 9th, 2001, 11:12 AM
you are listening ?
what for?
I am not speaking....

FatMan

d.paulson
May 9th, 2001, 01:43 PM
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

coolbiz
May 9th, 2001, 07:27 PM
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