Problem with adding Bookmark around Html table

Hi,
If I am trying to add bookmarks around a html table, the bookmark is not added.
For e.g. if I used the following code to add Bookmarks, it does not add the Bookmark

docBuilder.StartBookmark("ID");
docBuilder.InsertHtml("<table><tr><td>"test"</td><tr></table>");
docBuilder.EndBookmark("ID");

However, if I add any text before the “table” tag (e.g "abc <table><tr>....</tr></table>) then it adds the Bookmark correctly.

Thanks.

Hello

Thanks for your interest in Aspose.Words. I think in your case you can try using the code like the following:

Document doc = new Document();
DocumentBuilder docBuilder = new DocumentBuilder(doc);
docBuilder.StartBookmark("ID");
docBuilder.Writeln();
docBuilder.InsertHtml("<table><tr><td>'test'</td><tr></table>");
docBuilder.EndBookmark("ID");
doc.Save("C:\\Temp\\out.doc");

Best regards,