Find.MatchWildcards property (Word)

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

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

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.