Hi,
I am currently evaluating Aspose.Words for Java by migrating the functionality an existing Word 2010 "dotm" template to that of a Java application. The existing "dotm" template contains a number of "bookmarks" and uses a Userform/VBA macro to selectively remove sections of text to eventually produce a formatted letter.
I have by and large converted the Word template to a Java program. However, I am coming across a problem in a particular section of the template when consecutive bookmarks are removed, instead of removing the text within the bookmark, text from the next bookmark are also removed. Looking at the resulting word document, it looks like the Java app has not only removed the required bookmark, but it has also removed the bookmark start of the next bookmark and as a result, the entire "next' bookmark is somehow removed.
I've attached a stripped down dotm and Java program that demonstrate this issue, along with a VBA macro that demonstrate the correct behaviour ("testBookmarkProblem"). Can you have a look and let me know how I should be removing the bookmarks correctly?
Thanks,
Thomas