Hello,
All macros included in phpdocx to be used with LibreOffice must be added to the Module1.xba file, because they work using PHP methods such as:
$docx->transformDocument('document.docx', 'document.pdf', 'libreoffice', array('toc' => true));
$docx->transformDocument('document.docx', 'document.docx', 'libreoffice', array('comments' => true));
so they need one or more arguments to run.
These macros work will all OS where LibreOffice can be installed. Windows also has a Module1.xba file (the default path of this file is in the AppData\Roaming\LibreOfice folder of the user's profile).
Adding them using LibreOffice GUI requires removing parameters/URLs (they are not used by the LibreOffice GUI) and replacing protected characters. phpdocx supports adding them to the Module1.xba so they can be called from PHP. Sorry but we don't have macro versions to be added using the LibreOffice GUI. In this case, that is not used phpdocx, we recommend you check the documentation from LibreOffice:
https://books.libreoffice.org/en/GS70/GS7013-GettingStartedWithMacros.html#toc8
You can record a macro and the code we'll be generated automatically in the LibreOffice GUI.
Regards.