Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Search A  ".doc "??

Posted on 2002-05-22
4
Medium Priority
?
139 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 520 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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
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…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

604 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