Hello,
Those methods are fully tested and they work perfectly as you can check running the included samples and opening the DOCX with MS Word 2007 or newer. But, as you can read on the documentation pages (https://www.phpdocx.com/documentation/conversion-plugin/common-problems-and-possible-errors):
altChunk tag: The addExternalFile and replaceVariableByExternalFile methods use the Word altChunk internal tag. This allows to insert external files in a Word document. This tag is MS Word supported only, so it's not compatible with the conversion plugin.
And the API method (https://www.phpdocx.com/api-documentation/word-content/insert-docx-html-rtf-mht-txt-alternative-content-into-Word-with-PHP) also explains it:
This method is not compatible with the conversion plugin: the inserted docx will not render at all in the resulting PDF, DOC, RTF, ODT or HTML document.
These methods use altChunk tags that are only supported by MS Word 2007 or newer on Windows. But they aren't supported by LibreOffice, MS Word on macOS, MS Word 2003, Google Docs and others.
If you need to add an existing DOCX to any point of another DOCX, please check the following documentation:
https://www.phpdocx.com/documentation/cookbook/merge-docx-documents-anywhere
Please note you need to use phpdocx 6.5 or newer.
Regards.