Word Templates, Office 2010 and the Maintain Compatibility option

David Meego - Click for blog homepageA while ago I posted an article on Modifying Microsoft Dynamics GP 2010 Word Templates which demonstrated the basic methods for customizing word templates for Microsoft Dynamics GP 2010.

In that article, I mentioned that if you were using Word 2010 to edit the templates, you would have an option to Maintain compatibility with previous versions of Word on the Save As dialog. See screenshot below:

I had recommended leaving this option checked, but indicated that it did not make much difference.... Well, I was wrong.  The Dynamics GP support and development teams have seen issues with the Template Processing Engine (TPE) when this option is not selected.  The original post has now been updated to clarify that the option must be left selected.

So, what does the option really do?

It turns out that not all .docx files are the same.  There are some differences between Word 2007 .docx format and Word 2010 .docx format.  When this option is selected, the Word 2007 .docx format is maintained.  If you uncheck the option, the document will be saved in Word 2010 .docx format and the Maintain Compatibility option will not be available again for that document.  Once a document has been saved in Word 2010 .docx format, there is no way to save it again in Word 2007 .docx format.

I have a very simple example that can demonstrate this issue.  I added the template POP Purchase Order Blank Form Template based on the POP Purchase Order Blank Form Template* default template.  I then modified it in Word 2010 to add a box (with no fill) around the Creditor/Vendor address. See screenshot below:

I then used Save As to save the template to my Desktop. First saving as POP Purchase Order Blank Form Template with Maintain Compatibility turned on (ie. Word 2007 .docx format), and then as POP Purchase Order Blank Form Template 2010 with Maintain Compatibility turned off (ie. Word 2010 .docx format).  I then imported both templates back into Microsoft Dynamics GP.

When I print using the POP Purchase Order Blank Form Template file everything works as desired:

 However, when I print using the POP Purchase Order Blank Form Template 2010 file, I get the error "The XML data is invalid according to the schema. ".

 When I click OK I get a second error "Word found unreadable content .... "

After clicking Yes, the document finally opens.

 


 

So, imagine that I am in following situation.  I am using Word 2010 and  I have a template that does not offer the Maintain Compatibility option when I use Save As.  This means that the document has already been saved in Word 2010 .docx format.  I have spent a large number of hours working on this design and don't want to lose my work.  How can I get the template document back to Word 2007 .docx format?

The quick answer is.... start again from the default template and make sure you save it correctly this time. You can imagine that most consultants will not like that answer.

The longer answer is to add a new template based on the default template. Then modify both the newly added template and the template to be "fixed".  Then cut and paste the custom Header, Body and Footer sections into the new template.

Note: When pasting into Word, press delete to remove the additional paragraph mark. Also, remember to change the paper size and margins if necessary.

Once you have the template copied across, use Save As and make sure Maintain Compatibility is selected. Import your "fixed" template back into Microsoft Dynamics GP and the problem is solved.

 

For more information, check out these related posts:

Hope you find this fix useful. 

David