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

Free Support Forum - aspose.com

Writing a Table in a Bookmark

Hi,

I want to place some content inside an existing bookmark.
This works fine for regular text and for charts. But when writing a table inside the bookmark, a small issue happens: the table is placed before the bookmark.

See attached sample: AsposeWordsBookmarkReplacer.zip (21.9 KB)

It works when calling “documentBuilder.Writeln()” before creating the table.

Is this a small bug?

Best regards

Wolfgang

@wknauf,

Thanks for your inquiry. You are facing the expected behavior of Aspose.Words. The BookmarkStart and BookmarkEnd nodes are also child nodes of Paragraph node in your source document. These are inline level nodes and Table is Block-level node. We suggest you please read about Aspose.Words document object model.

Please ZIP and attach your expected output word document here for our reference. We will then provide you more information on this along with code.

Thanks for the reply. My workaround was to call “documentBuilder.Writeln()” before adding the table, so it is no problem for me.