05-31-2007 01:05 PM
06-01-2007 03:30 AM - edited 06-01-2007 03:30 AM
Hi George,
ActiveX may be the most direct route to grabbing this text - Michael Munroe describes using "find" here. I also came across a Word/ActiveX example that uses the NIReport VI "Generate Report Get Data to Modify.vi" to obtain the Word .doc automation reference. There's lots of examples on this site for ActiveX and Word (search: ActiveX Microsoft Word.) Here's one. Unfortunately, Word isn't installed on my PC or I might have tried to build something for you.
Cheers!
Message Edited by tbd on 06-01-2007 03:32 AM
06-01-2007 07:08 AM
Thanks. I found the first reference before, but it doesn't really describe how to get text after the find. Fortunately I was able to figure it out after much guessing. Here's how it goes for anyone who's interested. After the Find I had to do a Frame->Select to select the found word. Next came ActiveWindow->Selection->Range->End to get the location of the end of the selection. Then I used that end location as the Start for Document->Range->Text to give me the text I was looking for.
George