Copy link to clipboard
Copied
Hi All,
While I am creating a bookmark with properties name using javascript, name is not updating correctly.
myDoc.bookmarks.add(hyperlinkTextDestination, {name: element.contents});
naming update on alternate bookmark and "Anchor 1", "Actualy Naming", "Anchor 3", "Actualy Naming", "Anchor 5" and so on....
Best Regards,
Sumit
Copy link to clipboard
Copied
Try it like this:
var myBookmark = myDoc.bookmarks.add(hyperlinkTextDestination);
myBookmark.name = element.contents;
Copy link to clipboard
Copied
For this issue, there is one solution.
While adding bookmark store the name of bookmark & bookmark in a multidimensional array.
Once finished creating all the bookmark, then assign name again.
So names will be refreshed.
Best
Sunil
Copy link to clipboard
Copied
I also have faced this issue before 2-3 years. I got out of this issue using the method which I have explained you above.
Best
Sunil
Copy link to clipboard
Copied
Copy link to clipboard
Copied
Hi @Sunil Yadav ,
Thanks for your response.
I stored all the bookmarks specifier to an object with element content and letter rename it.
Sumit