Hello,
You can use the replaceVariableByText method after the WordFragment has been added. But the addExternalFile method uses an altChunk tag; these external files aren't transformed to MS Word format but added as external files, so you can't 'manipulate' their contents.
We recommend using embedHTML to add HTML and mergeDOCX to merge DOCX documents; using both methods you get MS Word contents that can be changed. If you need to merge other document formats, they can be transformed to DOCX using the conversion plugin.
If you need to change styles or tags on the fly you can use DOCXPath or DOCXCustomizer.
Regards.