MatchTextExactly Property

Applies To

FileSearch object.

Description

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.

See Also

MatchAllWordForms property, MatchCase property, NewSearch method.

Example

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

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