FindText Method

Searches the rest of a document for a specified string. If the string is found, FindText moves the selection to that string.

Syntax

object.FindText(text, direction, flags)

Parameters

The following parameters are available:

Parameter Description
text A String that represents the string you want to find.
direction A string constant of type SearchDirection that determines how to conduct the search.
Up: Starts a forward search.
Down: Starts a backward search.
flags A string constant of type SearchFlag that determines how to conduct the search.
MatchCase: Requires a case-sensitive match.
FindWholeWordOnly: Requires that whole words match.

Return Type

Boolean

Remarks

True if the search is successful; otherwise, False.