I have a task where I need to put placeholders in my .docx
files and automatically replace them with information that I have. I tried having ${VARNAME} as the placeholder syntax but in the document.xml for that docx file I see $, {, VARIABLE and } broken up into 4 different character runs. On what basis WORD chooses this. Is there a way so that this does not happen?
For replacing placeholder and manipulating docx files I am using docx4j. I am extracting the w:t
nodes via XPATH. Recently I tried having placeholder syntax as only $VARNAME and this was not broken up. Can I consider it a foolproof naming convention for placeholder. If not can u suggest how can I tackle this situation. Would introducing custom tags in docx help? Any advice appreciated.