Hello,
We are using Word templates with a lot of overlapping bookmarks in our company. We try to replace the text inside the bookmark from both bookmarks after another.
In both test cases only the text of the first bookmark is replaced and the text of the second bookmark remains in the document. In one case an error occurs.
Before we used Aspose for automation we tried automation with MS-Word and OpenOffice (UNO). With Word and OO the text of the bookmarks is substituted correctly and without error.
We would expect that Aspose would substitute also the text in both bookmarks or removes the text inside both bookmarks and not only one. Please fix it.
I tested it with Aspose-words-21.2.0-jdk17.jar.
Example source code with input and output documents do you find here:
Overlapping Bookmarks with Aspose Java.zip (99.6 KB)
The files “TextOut1 VB.docm” and “TextOut2 VB.docm” are the output with Visual basic macros. They contain the expected output.
“TextOut1.doc” and “TextOut2.doc” are the result with Aspose.
Kind regards
Heiko Voss