Search A ".doc "??

Hi

In VB is it possible to search a word document against a list of key words and when matches ar efound disply them ???


Code would be great or tips ???
silkiAsked:
Who is Participating?
 
Guy Hengel [angelIII / a3]Connect With a Mentor Billing EngineerCommented:
You can automate word:

dim w as object
dim d as object
set w = createobject ("Word.Application")
set d = w.Documents.Open ("c:\mydata\project.doc")

...

d.close false
set d = nothing
w.quit
set w = nothing

at the place ... you can do many things, including the .Find method of Word.

Note:
* if you check the 'Microsoft Word x.0' in the project references, you can use dim w as Word.Application etc instead, and can code much easier, but I don't use it because of binding problems for different version of word...

* If you know how to build macros with office, you can quite easily put in the good code for ...

CHeers

0
 
silkiAuthor Commented:
Thanx

any code exsamples for thr find cud i would have to match aginst a LIST of WORDS ???
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
You have to check each word in the list 1-by-1 ...
CHeers
0
 
silkiAuthor Commented:
Thanx

any code exsamples for thr find cud i would have to match aginst a LIST of WORDS ???
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.