ITextRange::FindTextEnd method (tom.h)
Searches up to Count characters for the string, bstr, starting from the range's End cp. The search is subject to the comparison parameter, Flags. If the string is found, the End cp is changed to be the end of the matched string, and pLength is set equal to the length of the string. If the string is not found, the range is unchanged and pLength is set equal to zero.
HRESULT FindTextEnd( BSTR bstr, long Count, long Flags, long *pLength );
String to search for.
Maximum number of characters to search. It can be one of the following.
|tomForward||Search to the end of the story. This is the default value.|
|n (greater than 0)||Search forward for n chars, starting from cpLim.|
|n (less than 0)||Search backward for n chars, starting from cpLim.|
Flags governing comparisons. It can be zero (the default) or any combination of the following values.
|tomMatchWord||2||Matches whole words.|
|tomMatchPattern||8||Matches regular expressions.|
The length of string matched.
The method returns an HRESULT value. If the method succeeds, it returns S_OK. If the method fails, it returns S_FALSE.
|Minimum supported client||Windows Vista [desktop apps only]|
|Minimum supported server||Windows Server 2003 [desktop apps only]|