Hello,
A DOCX that contains a macro must have docm extension, not docx, otherwise it thows an error when opening it with MS Word or LibreOffice. The following code generates a document with a macro (examples/LayoutAndGeneral/addMacroFromDoc/sample_1.php):
$docx = new CreateDocx('docm');
$docx->addMacroFromDoc('../../files/fileMacros.docm');
$docx->createDocx('example_addMacroFromDoc_1');
rename('example_addMacroFromDoc_1.docx', 'example_addMacroFromDoc_1.docm');
There's no known issues when importing macros or using a document that contains one or more macros. If you send to contact[at]phpdocx.com the file, we'll check it.
Regards.