Find.MatchWildcards Property

Word Developer Reference

True if the text to find contains wildcards. Read/write Boolean.

Syntax

expression.MatchWildcards

expression   An expression that returns a Find object.

Remarks

The MatchWildcards property corresponds to the Use wildcards check box in the Find and Replace dialog box (Edit menu).

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."

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

See Also