Function TWPCustomRtfEdit.BookmarkMoveToNext(AName:string; FindAnyName:Boolean) : Boolean

Unit: WPCTRMemo
Class: WPCTRMemo.TWPCustomRtfEdit

Parameters

  • AName:string
  • FindAnyName:Boolean

Returns

The type of the result value is Boolean.

Description

locates a bookmark and and moves Cursor. Start at the current position.
This example code will locate all bookmarks and change the character style to "bold": WPRichText1.CPPosition := 0; WPRichText1.TextCursor.SelectText := false;
while WPRichText1.BookmarkMoveToNext('', true) do begin if WPRichText1.CPObj<>nil then begin WPRichText1.TextCursor.SelectToHere(WPRichText1.CPObj.EndTag); WPRichText1.CurrAttr.AddStyle([afsBold]); end; WPRichText1.CPMoveNext; // Skip Object! WPRichText1.TextCursor.SelectText := false; end;