Error Printing Batch Of Cheque Remittances

Microsoft Dynamics GPI recently assisted a client with an upgrade of Microsoft Dynamics GP 10 to GP 2013 R2. As part of the upgrade we assisted the client to create some Word Template versions of sales invoice, purchase order, and cheque remittance (or check remittance to the American readers).

Everything appeared fine during development and initial testing. Fine that is until we tried producing a batch of twenty remittances which produced the following two error messages:

Microsoft Word - The file Check Remittance~2 cannot be opened because there are problems with the contents.Microsoft Word – The file Check Remittance~2 cannot be opened because there are problems with the contents.

When we clicked the OK button the next message appeared:

Microsoft Word - Word found unreadable content in 'Check Remittance~2'. Do you want to recover the contents of this document? If you trust the source of this document, click Yes.Microsoft Word – Word found unreadable content in ‘Check Remittance~2’. Do you want to recover the contents of this document? If you trust the source of this document, click Yes.

I did some investigation and found a blog post from the > Dynamics GP Support and Services Blog discussing this exact issue and outlining a solution.

The problem stemmed from when the Word Template version of the modified report was created; the Maintain compatibility with previous versions of Word checkbox was not marked. The problem is that this box cannot be marked once the document has been saved without it.

Or at least not directly. However, as the above blog outlines you can use VBA to create a new copy of the template with the checkbox marked. To do this, modify the Word Template and press Alt+F11 to open Word’s VBA Editor.

Click on View Immediate Window:

VBA Editor

The Immediate window will open at the bottom of the VBA Editor. Type the command activedocument.saveas2 filename:=”C:\users\myalias\desktop\doc1.docx“, compatibilitymode:=12 (change the highlighted section to your desired location and filename) and hit return; this will execute the VBA immediately (hence the name of the window) and create a copy of the open template in the location specified:

Immediate window

Open the newly created Word template and perform a Save As… making sure you have the Maintain compatibility with previous versions of Word checkbox marked:

Save As

Once this has been done, import the Word Template into Microsoft Dynamics GP’s Template Maintenance window and the problem when printing batches of documents will no longer occur.

What should we write about next?

Your Name (required) -
Your Email (required) -

(Visited 403 times, 1 visits today)

4 thoughts on “Error Printing Batch Of Cheque Remittances

Leave a Reply

Your email address will not be published. Required fields are marked *