MatchTextExactly Property

Microsoft Office Visual Basic

Some of the content in this topic may not be applicable to some languages.

True if the specified file search will find only files whose body text or file properties contain the exact word or phrase that you've specified. Read/write Boolean.

Example

This example searches the C:\My Documents folder and returns all files that contain the word "Run" either in the body text or in the file properties.

With Application.FileSearch
    .NewSearch
    .LookIn = "C:\My Documents"
    .TextOrProperty = "Run"
    .MatchTextExactly = True
    .FileType = msoFileTypeAllFiles
End With