I’ve inherited a mailmerge system that I need to rewrite from word automation to use Aspose.
Both systems need to run parallel (for a time at least) so I need to mimic the old functionality.
One problem I’m running into is that the old system removed a tag and the next character.
I have a document that is used as a template.
Part of this template are some blocks and somewhere is decided what blocks should be included in the created document.
The blocks are marked by: “
<sblok1>contents</sblok1>” (and any other numbers of course).
I’m able to find and extract the contents by using the
ReplacingCallback and inserting bookmarks which are later used to (optionally) insert the contents.
My problem is there might be a character after the closing
> which should be removed.
The old code actually has comments saying it should be a
BookmarkEnd:NextPreOrder(doc):getText() says it’s an
It also might be something else entirely, since there is no validation whatsoever.
In the attached overview, I want to remove the purple
¶ characters: overview.png (28.3 KB)
How do I remove the character following a
bookmarkend (or search result)?