Problem with merging empty bookmarks

Hi there
I have an issue with Word merging (we use Aspose.Total.9). I have a customer that creates bookmarks which we afterwards perform merge on. The issue is that sometimes they create a bookmark with no text selected (empty bookmark). In one particular case they put this 3 bookmarks in a table with one bookmark on each row and when we merge text into these bookmark, it seem to “eat” some part of the table, resulting in the texts all standing on the same row (because it seem to have removed the end of the tablerow).
The code we use is:

Private Aspose.Word.Document doc;
public void AddBookmarkValue(string bookmarkName, string bookmarkValue)
{
    if (doc.Range.Bookmarks[bookmarkName] != null)
        doc.Range.Bookmarks[bookmarkName].Text = bookmarkValue;
}

Could someone please verify that this happens to them too?

Hi
Thanks for your request. Could you please also attach your template here for testing? We will check the issue and provide you more information.
Best regards,

Here’s the dot file which the documents are based on.

Hi
Thank you for additional information. I am afraid I cannot reproduce the problem on my side. I used the latest version of Aspose.Words and the following code for testing:

Document doc = new Document(@"Test001\Notat.dot");
foreach(Bookmark bookmark in doc.Range.Bookmarks)
    bookmark.Text = bookmark.Name;
doc.Save(@"Test001\out.doc");

Please try using the latest version. You can download it from here:
https://releases.aspose.com/words/net
Also, please attach your output document here. It will help us to better understand the problem.
Best regards,

I replaced our current version which was 9.0.0.0 with the latest one 9.6.0.0 and can confirm that it fixes the problem.
Thank you for the information.