Hello to all
I'm not reinventing the wheel, but i would like to give my little contribution to other users whose can need to convert a .doc file to .txt to retrieve some data.
My little project:
- Put 2 Textboxes control in a window (one for the input and other for output filename)
- Put 2 buttons (convert and close)
in the "convert" button put these few lines of code:
//---------------------------------------------------------------------
autWord_server is object Automation "word.application"
autWord_server>>documents>>open (EDT_Edit1)
autWord_server>>ActiveDocument>>SaveAs (EDT_Edit2,2) //the '2' is corresponding to "save as Text file" from Winword
autWord_server>>Quit //to stop Winword execution in background
//----------------------------------------------------------------------
This little idea come from a needed to read some data stored in a lot of MsWord files and instead to read every file using an OleAutomation approach that could have some difficult, i prefered to convert them as text file and read each file line by line.
Hope to help someone whit this little solution,.
Gianni