Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files. Get free and professional technical support for Spire.Doc for .NET, Java, Android, C++, Python.

Tue Jun 28, 2022 6:07 am

Hi
Is there any way to enumerate all bookmarks in a document?
Please advice

enoemos
 
Posts: 2
Joined: Thu Oct 04, 2018 9:50 am

Tue Jun 28, 2022 6:31 am

Hello,

Thanks for your inquiry.

You can use the following code to get all bookmarks in the document.

Code: Select all
Document doc=new Document();
//A collection of all bookmarks in the document
//You can use a loop to get each bookmark
doc.Bookmarks
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Tue Jun 28, 2022 11:26 am

Thank you!
That was too easy... should have found that myself :roll:

enoemos
 
Posts: 2
Joined: Thu Oct 04, 2018 9:50 am

Wed Jun 29, 2022 3:24 am

Since you're not very familiar with Spire.Doc, it's no big deal :D . Have a nice day!
Sincerely,
Andy
E-iceblue support team
User avatar

Andy.Zhou
 
Posts: 483
Joined: Mon Mar 29, 2021 3:03 am

Return to Spire.Doc