A 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 - great info thanks - although I have to say I am one of the consultants who is not liking the quick answer that you provided for fixing the issue!
Posting from Mark Polino at DynamicAccounting.net
Great post..Really very informative.Thanks!
Fantastic article. Got this recently and could not work out what on earth was going on especially as it worked fine for one transaction but presented error when printing from a batch. I found that I could create a new report based on the default template. Export the Template to Word 2010, deleted the body, and paste in the body of my previous temple. Repeat per Header and Footer. Imported the report back in and now no problem. This method allowed me to quickly recreated a heavily formated design without having to tell the client and my boss that I need more time. Thank you again
Glad we could help.
If you're not sure if you will need Word 2007 compatibilty, wouldn't you want to keep "Maintain compatibility" checked all the time then? What's the drawback of using this option?
For documents (other than Word Templates), keeping this option turned on might mean that Word 2010 specific features might not be saved.
I don't have the Maintain compatibility with previous versions of Word options on my Word 2010 install and neither does the client I am trying to help, any ideas?
The Maintain compatibility with previous versions of Word option is ONLY visible if the document has not already been saved with the option unchecked.
This article has two methods to get the format back to Office 2007 docx format.
Based on the above, and the fact when we open up the template and/or generated invoice, the flag for Maintain Compatibility is not visible, you are saying it has already been set (I think).
But we get the first error (XML) when we generate invoice by using Destination > File (DOCX). We cannot open these files in Word2007 at all. We get your first error message, click on OK, and then nothing.
If the option is not available, then the document has already been saved at least once with the option not selected.
You need to use the methods in the article to recreate the template back in the Office 2007 format.
OK, thanks for your reply David - so we need to re-create them in Word 2007.
I believe this is a GP2010 bug however. When the invoice is generated and opened up in Word2010, and THEN saved, the invoice document is able to be opened in Word 2007 - no issues. It is ONLY when the Report Destination to File DOCX format is used where we get the issue - when Dynamics GP creates the file, it appears to IGNORE the compatibility setting in the document.
PLEASE READ BEFORE POSTING
Please only post comments relating to the topic of this page.
If you wish to ask a technical question, please use the links in the links section (scroll down, on right hand side) to ask on the Newsgroups or Forums. If you ask on the Newsgroups or Forums, others in the community can respond and the answers are available for everyone in the future.