We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Need to list of bookmarks in document

Hi Team,
We have written POC for conversion of wordml to PDF with aspose. Our wordml contains bookmarks
we are using below for this
Bookmarks bookmarks = doc.Range.Bookmarks;
but Bookmarks class is not present in com.aspose.words.Bookmark
also Range.Bookmarks is not present in above class
Please help us regarding this
Thanks and Regards,
Chaitali Shirude

Hi Chaitali,

Thanks for your inquiry. Please try using the following code to list all bookmarks in Word document:

Document doc = new Document(getMyDir() + “input.docx”);
for(Bookmark bookmark : doc.getRange().getBookmarks()){

Hope, this helps.

Best regards,