Link to home
Start Free TrialLog in
Avatar of wardo123
wardo123Flag for United States of America

asked on

vb .net search for text in a Word document

I need to find a way to use VB 2008 express to open a Word document and find a text string and report back the following string.  Following are the requirments.
1) The text string can be located in the Word body or in the header information, so the search needs to take place in both locations (I have a search that works for the body, but doesn't find info in the header)
2) I may search for "Exam Date:" and then I need to return the following date, so if the word document had Exam Date: 01/02/2009 then I should return 01/02/2009
3) For the code that I'm using that finds the string in the Body, I find that the program will crash if one of the word documents being looked at is already open.  I only need read only data, so I would like to find a way around this.
Avatar of chandresh43
chandresh43
Flag of India image

Avatar of wardo123

ASKER

These exampes are for searching in the Word body, they won't find text that is in the Header in a Word Documet.  I already have a working search for Word that will search the body, I need a search that will look in the body and the Header information.

Thanks
ASKER CERTIFIED SOLUTION
Avatar of wardo123
wardo123
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial