I wonder if someone can help me with this rather thorny issue.
Thanks for your request. I used the following code for testing and I am unable to reproduce the problem:
// Open template.
Document doc = new Document(@"Test001\BLANKCR.doc");
// Loop through all bookmarks and replace thir values.
foreach (Bookmark bookmark in doc.Range.Bookmarks)
bookmark.Text = bookmark.Name + " Replaced";
// Save output.
I used the latest version of Aspose.Words for testing. You can download it from here:
Answering your question, Aspose.Words can silently resolve errors in the document, but this document seem to look fine and it works as expected on my side. Could you please try running the code I mentioned above for testing and let me know if it works as expected? Maybe the reason of the problem is data you put into the bookmarks.
Thanks for your reply, Alexey.
Thanks for your request. Yes, Aspose.Words should throw an exception. But it would be better if you get the data that causes the problem and attach them here for testing.
You can download the latest versions of Aspose.Words and test it in evaluation mode. Or request a temporary license and test without evaluation version limitations.
OK, so I got to the bottom of the problem, and as you may have guessed, the problem was not with the Aspose library. An incorrect DML retrieval had deleted some of the mail merge field entries.
It is perfect, that you already found the solution. If you need more assistance, we will be glad to help you.