WPCubed Product Support

Finding bookmarks in clipboard text

Is there a way to find the names of bookmarks in clipboard text by using the BeforePasteText event?

#1 ♥ 0
4.7k Views 2 users read 1 min
support

Hi,

yes, this is possible:

var i: Integer;
  obj: TWPTextObj;
  apar : TParagraph;
begin

  apar := par;
  while apar<>nil do
  begin
     for i:=0 to apar.CharCount do
     begin
        obj := apar.ObjectRef[i];
        if (obj<>nil) and
           (obj.ObjType=wpobjBookmark) then
           obj.ObjName ...
     end;
     apar := apar.next;
  end;
#2 ♥ 0

Replacing objName with Name, this works perfectly. Thank you.

#3 ♥ 0
This category is archived. No new posts are possible.