A difficult question!

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have CV's (WORD DOCS) linked from Access to each individual person listed
in Access. What I would like to do is to be able to create a search from
access, to search these CV's for particular words by pressing a CV Search
button in access. Ie if the user is looking for a person with customer
service background within a call centre, for the user to enter customer
service and/or call centre and access would search the WORD DOCs and retrieve
a list of names....

A Is this possible, if so how??
B If its not possible in access, how else is it possible combined with access?

Any help would be great. Thanks!
 
Not sure how much coding you know, but you can use OLE automation to 'read'
the word documents.

I have given you the bare bones and it will need developing further.

Regards,
Steve.


Sub a()

Dim wrd As Object
Dim wrddoc As Object

Dim strFind As String
Dim blnFound As Boolean

strFind = InputBox("Enter Text to Find")

Set wrd = GetObject("<<< Word Document Path / File name >>>")

wrd.Application.Visible = True

With wrd.Application

.selection.Find.Text = strFind
.selection.Find.Execute

If .selection = strFind Then blnFound = True

End With

Loop

End Sub
 
Thanks Steve, Its a start... I really only know the basics of Code, but can
definately learn! Regarding the coding below, in particular strFind =
InputBox("Enter text to find") would this means that you could put several
different words in here and it will bring back names of documents that hold
ALL of that information that you enter, or would it be an AND/OR situation
whereby it would bring back any docs with:
for instance MAINTENANCE AND/OR FITTER.......
or just docs containing both words?

Thanks.
 
It would only find the exact string entered.

It could certainly be developed to look for words like and/or and then
perform the search for the seperate words. Maybe wildcards could be used as
well. The code example is very basic!

The line:
If .selection = strFind Then blnFound = True

Determines wether the text actually exists in the document and would be
coded to Append the Name to a table for querying after the search has been
performed. I used the blnFound variable for testing.

Steve.
 
Back
Top