Forum


Replies: 1   Views: 2433
Word template created with ms word 2016 results corrupted when opening with word 2007
Topic closed:
Please note this is an old forum thread. Information in this post may be out-to-date and/or erroneous.
Every phpdocx version includes new features and improvements. Previously unsupported features may have been added to newer releases, or past issues may have been corrected.
We encourage you to download the current phpdocx version and check the Documentation available.

Posted by gmauriello  · 06-07-2017 - 14:40

Hi, I am using the version 6.5 of the PHP DOCX software and I noticed the following error:

I have a docx template (Created with word 2016) and I'm generating the word document through the CreateDocxFromTemplate class. All works correctly both on WORD 2010 and WORD 2016 but when I open the generated files in WORD 2007, it says: "Word was unable to open this document. it may be corrupt". 


How can I solve ? (May be the version with which I created the template? [WORD 2016]).

Thanks in advance.

Posted by admin  · 06-07-2017 - 15:21

Hello,

phpdocx is compatible and tested with all versions of MS Word. Maybe when you have created the template with MS Word 2016 it has added some incompatible content with MS Word 2007?

We recommend you to try a template created with MS Word 2007. If you find out the incompatible tag or content created by MS Word 2016 and it's in the body you could remove it using DOCXPath. Otherwise you can remove it manually and package the DOCX again (it's a ZIP file).

Word was unable to open this document. it may be corrupt is a generic error from MS Word when it can't read some relationship or tag or there's a missing Content Type extension.

If you send the DOCX that returns the corruption error to contact[at]phpdocx.com we'll check it.

Regards.