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

Free Support Forum - aspose.com

Bookmarks are bring converted into anchor tags

Hi Aspose team,

Hope you are doing fine!

I have a work document which contains Bookmarks (I have attached this document). When I am converting it to HTML, then it is generating anchor tags (below is the HTML conversion of attached document).


Is it possible that bookmarks are converted into div/p tags instead of anchor (a) tags? Thanks!

Regards,
Zeeshan
Hi Zeeshan,

Thanks for your inquiry. It would be great if you please share your expected output HTML. We will then provide you more information about your query along with code.

Hi,
Thanks for quick response!

I am expecting the output as shown below. Thanks!

This is a bookmark


Regards,
Zeeshan

Hi Zeeshan,


Thanks for sharing the detail. Please use following code example to get the desired output.

Document doc = new Document(MyDir + “Bookmark_test.docx”);<o:p></o:p>

doc.Range.Bookmarks["test"].Remove();

doc.Range.Bookmarks["test2"].Remove();

doc.Save(MyDir + "17.5.html");