Searching Word Documents

L

Les

Is there a way of coding a button so I can use it to search the contents of
documents.

The documents are CV's which are held in C:\CV Documents directory.

It would be ideal to be able to type the search criterea into a field on my
form.

Les
 
C

Calvin Smith

Hi,

You'll want to use Word automation from Access for this
task. Once you establish a Word pointer to your document,
you can do something like the following example:

oAppWordPointer.Documents.Open ("C:\CV.doc")
With oAppWordPointer
With .Selection.Find
.Text = "Calvin Smith"
.Forward = True
.Wrap = wdFindContinue
End With
End With

Calvin Smith
http://www.CalvinSmithSoftware.com - Automation Code
http://www.SpanglesNY.com - Fendi, Prada, etc - 60% off
 
L

Les

Thanks Calvin I will look this up!

Les


Calvin Smith said:
Hi,

You'll want to use Word automation from Access for this
task. Once you establish a Word pointer to your document,
you can do something like the following example:

oAppWordPointer.Documents.Open ("C:\CV.doc")
With oAppWordPointer
With .Selection.Find
.Text = "Calvin Smith"
.Forward = True
.Wrap = wdFindContinue
End With
End With

Calvin Smith
http://www.CalvinSmithSoftware.com - Automation Code
http://www.SpanglesNY.com - Fendi, Prada, etc - 60% off
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top