Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Bookmark Naming

Engaged ,
May 17, 2021 May 17, 2021

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
672
Translate
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

Try it like this:

 

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

 

Translate
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
Advocate ,
May 26, 2021 May 26, 2021

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 

 

Translate
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
Advocate ,
May 26, 2021 May 26, 2021

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

Translate
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
Advocate ,
May 26, 2021 May 26, 2021
Translate
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
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
Translate
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