Function TWPRTFDataCollectionBase.FindParWithText(findtext:string; StartWith:TWPRTFDataBlock) : TParagraph

Unit: WPRTEDefs
Class: WPRTEDefs.TWPRTFDataCollectionBase

Parameters

Returns

The type of the result value is TParagraph.

Description

Searches for text globally. The function can also locate text in other layers, such as text boxes or foot notes. var par : TParagraph; begin par:=WPRichText1.RTFData.FindParWithText('THEMA', nil); if par<>nil then begin WPRichText1.ActiveText:=par.RTFData; WPRichText1.SetFocus; WPRichText1.ScrollToPosition(0,50,50); end else ShowMessage('Not found'); end;