FileType Property Example
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
This example searches for all Binder files located in the My Documents folder. The example displays a message box that contains the name and location of each file thats found.
Set fs = Application.FileSearch
With fs
.LookIn = "C:\My Documents"
.FileType = msoFileTypeBinders
If .Execute > 0 Then
MsgBox "There were " & .FoundFiles.Count & _
" Binder file(s) found."
For i = 1 To .FoundFiles.Count
MsgBox .FoundFiles(i)
Next i
Else
MsgBox "There were no Binder files found."
End If
End With