Closed NTC4818 closed 6 months ago
Hmm, I'm not sure the Python version has anything to do with it. There are some slight differences in the .DOCM package, I believe related mostly to the "content-type" (MIME-type roughly) associated with the main document part when it is macro-enabled. There's been some work on this, maybe have a look through the PRs (I'd start with Google for that) and you should find the gist of what it would take and maybe some working code modifications. https://github.com/python-openxml/python-docx/blob/master/src/docx/opc/constants.py#L201-L203
Looks like this pull request is still yet to be added which might have the functionality. Testing now. https://github.com/python-openxml/python-docx/pull/716/files
Works great, might be worth a merge.
Curious if there is an explanation around .docm files and why they might not be read in newer versions of python. Found this when upgrading aws lambda versions recently and curious how I might go about continuing this functionality even though it may be slightly incorrect.