Hello,
The easiest approach is using the getWordFiles method to check if the DOCX/DOCM file contains a macro file. For example:
$docx = new CreateDocxFromTemplate('fileMacros.docm');
$contentsVbaData = $docx->getWordFiles('word/vbaData.xml');
$contentsVbaProjectData = $docx->getWordFiles('word/vbaProject.bin');
if ($contentsVbaData || $contentsVbaProjectData) {
echo 'Macro file found' . PHP_EOL;
}
Regards.