Solved

Search A  ".doc "??

Posted on 2002-05-22
4
137 Views
Last Modified: 2010-05-02
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 ???
0
Comment
Question by:silki
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 143

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 130 total points
ID: 7026728
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
 

Author Comment

by:silki
ID: 7026836
Thanx

any code exsamples for thr find cud i would have to match aginst a LIST of WORDS ???
0
 
LVL 143

Expert Comment

by:Guy Hengel [angelIII / a3]
ID: 7026853
You have to check each word in the list 1-by-1 ...
CHeers
0
 

Author Comment

by:silki
ID: 7026866
Thanx

any code exsamples for thr find cud i would have to match aginst a LIST of WORDS ???
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question