Have a read of the help system for the "File Search" object. There is a MatchAllWordForms property and a good example of how to use the property.
managed to get the code work except It will only work with *.doc file types, any clues ?
regards Leckie
Dim fs As Object
Dim I As Integer
Set fs = Application.FileSearch
With fs
.NewSearch
.LookIn = "C:\My Documents"
.SearchSubFolders = True
.TextOrProperty = "the"
.MatchAllWordForms = True
'.FileName = "*.txt"
If .Execute > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" file(s) found."
For I = 1 To .FoundFiles.Count
MsgBox .FoundFiles(I)
Next I
Else
MsgBox "There were no files found."
End If
End With
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.