Creating a Word Template for Dynamics GP

Creating a Word Template requires working with Microsoft Word and Dynamics GP Report Writer. This post will walk you through the required steps. It’s important to perform these steps in order. You also will be working with the Template Configuration and Template Maintenance in Dynamics GP.

You must have two applications installed before beginning this process:  Microsoft Dynamics GP Add-On for Word and Open XML SDK 2.0 for Microsoft Office. Open XML will be installed when you install Dynamics GP. The Dynamics GP Add-On for Word is located on the Dynamics CD.

8833-1

8833-2

To use Microsoft Word with Dynamics GP, you must add the “Developer” tab to your Word ribbon bar. Go to Options | Customize Ribbon and select “Popular Commands.” Add the Developer function to the Ribbon list and then check the box. Click “OK.”

8833-3

Template Configuration-Reports | Template Configuration

The configuration window allows you to enable a specific form(s) to work as a template.

Expand the trees for Enable, Company and Series. Mark the document(s) for which you want to create a template. Be sure to mark the Enable Report Templates and, if desired, to allow use of the Standard form even though you’re using the template.

8833-4

The next step is to create a modified GP report in Report Writer. You may want to modify the report with a definition field. You can place the definition field anywhere on the report, regardless of where you place it on the template. You will need to make note of the section where you have placed the field, such as the “Report Header” shown below. (I have added the Vendor ID.) Save and close the report. Go back into Dynamics.

8833-5

Dynamics | Tools | Setup | System | Alternate Modified Forms & Reports

You must give access to the modified form for the series with which you are working.

8833-6

Creating an XML File

The next required step is to create an XML file in order to create your template. You will need to go to the entry screen of the series you are working with and bring up a transaction to print. When you print the form, you will select the Standard form and print to a file. The file must be an XML file.

8833-7 8833-8

Click “OK.” Open the file to make sure it is an XML file.

8833-9

Template Maintenance-Reports | Template Maintenance

Select the report name you will be working with. Be sure to select the modified report.

8833-10

Once you have selected your modified report, you will be required to create the template you will be working with. Select “Modify.”

8833-11

Selecting “Modify” will launch Microsoft Word. Click on the “Developer” tab on the ribbon bar. Click on the “Field List” tab on the ribbon bar.

8833-12

Clicking “Field List” will open the “Source File” window to the left of the document. Select the XML resource. This will populate the report section list.

8833-13

Once you bring up the source list, you will have to “Remove Source.” Once you click “Remove,” you will then click on “Add Source.” 8833-14

When you click “Add Source,” you will select the XML file you saved. Click “Open.”

8833-15

This will take you back to Microsoft Word. Select the source file again. Select the Report Section in which you placed the field definition in Report Writer. Scroll down to the field definitions and select the field definition that you put on the modified report in Report Writer. In this example, select “PM_Vendor_MSTR”, “Vendor ID.”

8833-16

Before you drag that field definition to the template, you will be required to insert a cell where you want to position that field. Click the area of the template and then right-click to insert a cell. In this example, I have inserted a cell in the “Header” section. You can now drag and drop the field definition into that cell.

8833-17

Once you have made your modifications you will need to save the template as a Word document. It will want to save the file to the temp directory, but it is recommended to save it to a shared location on your server. In this example, I have saved it to my desktop.

8833-18

Once the Word document is saved, you will return to the Template Maintenance screen.

In the Template Maintenance screen, you will need to add that new template. You may replace the existing template, rename it or create a new named file. Highlight the existing template and click the plus sign above it. This will launch Windows Explorer for you to select your saved Word template.

8833-19

Select your new Word template, and then click “Open.”

8833-20

You may get a “Replace” message if you gave the report the same name as the original. Click “Yes.”

8833-21

You will be required to assign the template to a company or companies and vendor(s). Select “Customers” if you are working with sales templates. You must have at least one “Default” template.

Click “Assign.” This will open an alternate screen.

8833-22

This is the Company screen. Select the company or companies that will be using this template. Click “Set Default” to select your template.

8833-23

Click “Save.”

8833-24

Click “Assign” again for your vendors. Click the plus symbol to open the “Add Vendors” window.

8833-25

Select a vendor or a range of vendors. Click “OK.”8833-26

Mark the vendors you want to use the template or click “Mark All.” Save.

8833-27

Close the Template Maintenance screen.

When you go back to the Series Transactions screen, select your document and print the template to the screen to verify your changes. Be sure to select “Template” as your report type.

8833-28

You should see your template with the modifications you have made.

8833-29

Note:  Although you may make cosmetic changes to your template in Word, if you add any field definition, you must make that change in Report Writer. Once you have made that change, you are required to create another XML file and start the process again.

For more information, please contact our Microsoft Dynamics GP Support Center.

 

 

 

13 thoughts on “Creating a Word Template for Dynamics GP

  1. avatarSteve Pena

    Victoria,

    Thanks for the article. I went through the steps and was able to create a modified version. However, I now need to make additional modifications.

    Every time I print the report, I get a previous version I created. Any changes I make are not shown. I can’t find the version I’m supposed to modify.

    Can you please help me on this? Essentially, I just need to clear any previous versions and start over.

    Thanks,

    Steve

  2. avatarChristina Phillips

    Steve,

    Once you have made the changes, you have to save as on the word document, saving it somewhere. Then add it back in to GP using the green plus again, and it will overwrite.

    Thanks!

  3. avatarTom

    I am having an issue. I’ve extended a couple of fields to include more characters in report writer. I followed all steps here and pulled in the modified fields in Word, re-imported the modified file, but it is still truncating the fields. The updated files are properly assigned (I’m changing the Word fonts to make sure the most recent attempt is happening), but still having issues. Any help possible?

    1. avatarNeil Lombard

      When you made changes in Report Writer you will need to generate an XML file again and attach that XML to the Template. Then the updated fields will display correctly.

  4. avatarGraeme

    I’ve gone for an approach where we want to use Debtor Classes to decide which Word template is shown. For simplicity, I’ll call them EUR, USD, GBP, SEK, NOK – one for each of our main currencies.

    I have set up all the templates in the way described above but when I print a SOP Blank History Order for a GBP debtor class, I get shown the EUR template or whatever template is currently the default for that company.

    https://community.dynamics.com/gp/f/32/p/160181/385935#385935

    Looks like it’s a known bug by Microsoft – bug 69668.

  5. avatarHeidi Jensen

    OK, so to follow up on my question, I found a Msft KB article that explains on how manage the add-ins. I followed the steps but the add-in is not actually disabled. Instead when I choose to manage it, it says
    Not loaded. The Managed Add-in Loader failed to Initialize.

    Is this a Msft Word problem or a GP problem?

  6. avatarSandeep Maroo

    Its a great article!!!!.
    Is there a way to add additional field in the Body of Message in Message Setup window apart from what is displayed in the Field drop down. For Ex: Currency ID in case of “Sales Invoice”.

Leave a Reply

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