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.
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:
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.
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:
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: