Hello,
We are using Word templates with bookmarks enclosing each other in our company. We try to replace the text inside the bookmark from both bookmarks one after another.
In the given test case the text of both bookmarks is replaced and the text of both bookmarks remains in the document. But the inner bookmark and its text has NOT to remain in the document.
Before we used Aspose for automation we tried automation with MS-Word and OpenOffice/LibreOffice (UNO). With Word and OO the text of the bookmarks is substituted correctly and without error.
We would expect that Aspose would delete the inner bookmark and only the text of the outer bookmark would appear in the document. Please fix it.
I tested it with Aspose-words-21.8.0-jdk17.jar.
Example source code with input and output documents do you find here:
TestAspose 210819.zip (66.2 KB)
The file “TextFile [1] VB Out.docm” is the output with Visual basic macro. It contains the expected output.
“TextFile [1] Aspose Out.docm” is the result with Aspose. As you may see, the document contains both bookmarks with the corresponding texts.
The issue is similar but not identical with the support case WORDSNET-21830 which I have opened in February 2021 (thanks for fixing). I am sorry that I only noticed this second mistake now.
Kind regards
Heiko Voss