Finding common words in documents as part of database

N

nmh

I have an Access 2007 database with a number of clients. I also have their
resumes in both .doc and pdf formats. I would like to be able to type in a
word, i.e. technology, and if that word appears in any resumes, the name of
the person(s) who owns that resume would appear. Simply a type of name search
with criteria.

Is that possible to do with Access. If so, how would I approach this topic.
Any help and assistance would be greatly appreciated. Thanks.

Norm.
 
A

Arvin Meyer MVP

Here's some code that may help:

Function SearchText()
' Search for text in a file
' Note: Must set a reference to Microsoft Office Object Library
Dim q As Long
With Application.FileSearch
.NewSearch
.LookIn = "D:\" 'Path
.SearchSubFolders = True
.FileName = "*.txt"
.TextOrProperty = "Arvin"
If .Execute() > 0 Then
For q = 1 To .FoundFiles.Count
Debug.Print .FoundFiles(q)
Next
End If
End With
End Function
 
L

Lars Brownies

Cool option! I tested it on pdf files but that doens't work. Is that
correct?

Lars
 
N

nmh

Many thanks Arvin. I shall give it a go. I would think that it would only
work in txt or doc files and not pdf. I have quite a few of them as doc
files.

Norm.
 
A

Arvin Meyer MVP

Lots of PDFs are not searchable, or only searchable with their own built-in
utility.

Did you remember to change:

.FileName = "*.txt"

to:

.FileName = "*.pdf"
 
A

Arvin Meyer MVP

As I mentioned in my other reply, Lots of PDFs are not searchable, or only
searchable with their own built-in utility. It will find .doc file text You
can also only search for 1 filetype at a time, and you must change:

.FileName = "*.txt"

to the file extension you want.
 
L

Lars Brownies

Yes, I did change the extension to pdf. I had one pdf file in the folder
which was not searchable for the application.filesearch. However, this pdf
file ís searchable for the windows explorer (XP) search option.

Lars
 
K

kate

Arvin Meyer MVP said:
Here's some code that may help:

Function SearchText()
' Search for text in a file
' Note: Must set a reference to Microsoft Office Object Library
Dim q As Long
With Application.FileSearch
.NewSearch
.LookIn = "D:\" 'Path
.SearchSubFolders = True
.FileName = "*.txt"
.TextOrProperty = "Arvin"
If .Execute() > 0 Then
For q = 1 To .FoundFiles.Count
Debug.Print .FoundFiles(q)
Next
End If
End With
End Function


--
Arvin Meyer, MCP, MVP
http://www.datastrat.com
http://www.mvps.org/access
http://www.accessmvp.com
 

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