I have just used the docx4j lib for the first time. I need to replace tokens in a Word document and have looked at the sample UnmarshallFromTemplate which really does what I would like to do.
However I have seen some strange behaviour when editing the Word document - a task I would like to allow my end users to be able to do.
Certain changes to the Word document seem to "break" the tokens and docx4j no longer does the substitution. I'm guessing this has to do with how Word internally represents (and saves) the document, and suddenly a "text" is no longer a single text object in docx4j.
However it is impossible for the end users to see this because the document tokens look fine in Word.
Does anyone have any thoughts on this - any way around it?