Searching Word Documents

  • Thread starter Thread starter Les
  • Start date Start date
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
 
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
 
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
 
Back
Top