The problem is following. I have a tool that generates
.docm files. These files contain some
macros. The code of macros has settings information, like
URLs, etc. I want to somehow access from
PHP this macros in order to make changes programmatically. This is especially necessary when the whole application with this document generator moves to another server.
Best How To :
.docm document can be more or less be considered to be a normal
You can therefore open your document with some PHP unzipping function/library, thereby gaining access to the included file
word/vbaProject.bin. You then need find or create a PHP library that can modify this
A quick search pointed me to this answer where the documentation for the
vbaProject.bin file format is linked to: http://stackoverflow.com/a/17538985/1560865
Since the file format seems to be quite complex and there will probably be no PHP library available for it, you might want to look for an easier way though....