>Hi,
> I would like to get the content of word document from MS Word, to process the text into some form by used for speech. Is there any way to do so?? I know that we need to createobject of word.application. That, what the following command and statement ???
>Thank you
Hi John,
Here's a bit of code that can be used to get the complete text of a document from Word 97
LOCAL loWord
loWord = CREATEOBJECT("Word.Application")
loWord..documents.open("c:\test.doc")
loWord.documents("test.doc").select
lcText = loWord.selection.text
and now lcText contains the text of the document.
There are probably better ways to process the document, rather than just grabbing all of the text, you could iterate through each section of the document, using the appropriate collections.
To get info on the Word 97 object model, start the office 97 setup, go to the Word section, then the Help section, and install the Microsoft Word Visual Basic Reference. This help file will now be available from the main MS Word help contents.