Bookmark Naming

Contributor ,
May 17, 2021 May 17, 2021

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....

Capture.PNG

Best Regards,

Sumit

TOPICS
Scripting, SDK

Views

198

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
May 23, 2021 May 23, 2021

Copy link to clipboard

Copied

Try it like this:

 

var myBookmark = myDoc.bookmarks.add(hyperlinkTextDestination);
myBookmark.name = element.contents;

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 26, 2021 May 26, 2021

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 

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 26, 2021 May 26, 2021

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

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
May 26, 2021 May 26, 2021

Copy link to clipboard

Copied

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Jul 18, 2021 Jul 18, 2021

Copy link to clipboard

Copied

LATEST

Hi @Sunil Yadav ,

 

Thanks for your response. 

I stored all the bookmarks specifier to an object with element content and letter rename it.

 

Sumit 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines