MatchAllWordForms Property

Microsoft Word Visual Basic

MatchAllWordForms Property

       

True if all forms of the text to find are found by the find operation (for instance, if the text to find is "sit," "sat" and "sitting" are found as well). Read/write Boolean.

expression.MatchAllWordForms

expression   Required. An expression that returns a Find object.

Remarks

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

Example

This example selects the next form of the word "sit" found in the selection or displays a message box if a form of "sit" isn't found.

With Selection.Find
    .MatchAllWordForms = True
    .Text = "sit"
    .Execute Format:=False
    If .Found = False Then MsgBox "Not Found"
End With