| MsoFileType can be one of these MsoFileType constants. |
| msoFileTypeAllFiles |
| msoFileTypeBinders |
| msoFileTypeCalendarItem |
| msoFileTypeContactItem |
| msoFileTypeCustom |
| msoFileTypeDatabases |
| msoFileTypeDataConnectionFiles |
| msoFileTypeDesignerFiles |
| msoFileTypeDocumentImagingFiles |
| msoFileTypeExcelWorkbooks |
| msoFileTypeJournalItem |
| msoFileTypeMailItem |
| msoFileTypeNoteItem |
| msoFileTypeOfficeFiles |
| msoFileTypeOutlookItems |
| msoFileTypePhotoDrawFiles |
| msoFileTypePowerPointPresentations |
| msoFileTypeProjectFiles |
| msoFileTypePublisherFiles |
| msoFileTypeTaskItem |
| msoFileTypeTemplates |
| msoFileTypeVisioFiles |
| msoFileTypeWebPages |
| msoFileTypeWordDocuments |
expression.FileType
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
The constant msoFileTypeOfficeFiles includes all files with any of the following extensions: *.doc, *.xls, *.ppt, *.pps, *.obd, *.mdb, *.mpd, *.dot, *.xlt, *.pot, *.obt, *.htm, or *.html.
Example
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 that’s 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