Hello,
I have been using an old version of docx4j 6.1.2 and the VariablePrepare was working as expected.
However, after I updated to the new version 8.3.0 it is now giving me Docx4jException: Deprecated. I looked through the sample files to see if there is a new way to do it but with no luck.
I don't know if this would help but the dependencies used are docx4j-core and docx4j-JAXB-Internal.