Wed, 05/12/2021 - 14:54 By Fabian Kalchofner

Dynamics 365 Word Template update metadata

We all know this, we created a new Word template and it looks good. But then, we have a newly created attribute, which needs to be displayed in the existing Word template. Instead of creating a new one and copy all from the old template, I'll show you, how you can update the existing Word template.

Basically, the Word templated (e.g. AccountDetails.docx) is a zipped folder. So you can rename the file to AccountDetails.zip and extract the zip.

Dynamics 365 Word Template update metadata

In the subfolder "customXML" you'll find a file named "item.xml". Open this file with your favorite text editor and you'll see the following:

item.xml

Now you can simple add a node with the logical name of the attribute. This will also work for related entities found in the xml file.

Dynamics 365 Word Template update metadata

Once done, zip the files in the folder AccountDetails and rename the zip file to AccountDetails.docx. You'll see the newly added field in the XML Mapping Pane in Word:

XML Mapping Pane

If you use a tool like 7zip, you can directly open the .docx file without renaming it to .zip and replace the existing item.xml:

7zip

Dynamics 365 Word Template update metadata

Add new comment

Image CAPTCHA
Enter the characters shown in the image.