MatchWildcards Property

Microsoft Word Visual Basic

MatchWildcards Property

       

True if the text to find contains wildcards. Corresponds to the Use wildcards check box in the Find and Replace dialog box (Edit menu). Read/write Boolean.

expression.MatchWildcards

expression   Required. An expression that returns a Find object.

Remarks

Use the Text property of the Find object or use the FindText argument with the Execute method to specify the text to be located in a document.

Example

This example finds and selects the next three-letter word that begins with "s" and ends with "t."

With Selection.Find
    .ClearFormatting
    .Text = "s?t"
    .MatchAllWordForms = False
    .MatchSoundsLike = False
    .MatchFuzzy = False
    .MatchWildcards = True
    .Execute Format:=False, Forward:=True
End With