Share via


TextRange.findText Method

SharePoint Designer Developer Reference

Searches for text in the document, positions the start and end points of the range to encompass the search string, and returns a Boolean that represents whether the search was successful.

Syntax

expression.findText(String, Count, flags)

expression   Required. A variable that represents an TextRange object.

Parameters

Name Required/Optional Data Type Description
String Required String Specifies the text to find.
Count Optional Long Specifies the number of characters to search from the starting point of the range. A positive integer indicates a forward search; a negative integer indicates a backward search.
flags Optional Long Specifies one or more of the following flags to indicate the type of search:
Value Description
2
Matches whole words only.
4
Matches case.

See Also