Welcome Dialog

Welcome to the Community!

We have a brand new look! Take a tour with us and explore the latest updates on Adobe Support Community.


Bookmark Naming

Engaged ,
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

-Sumit
TOPICS
Scripting, SDK

Views

206

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
Engaged ,
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 

-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