1

I have set up Word templates for writing reports.

I have used xml mapping in a template document to deal with repeating text e.g. if a client's name was entered in one content control, this was mapped and copying the content control to other parts of the document meant that the text would be updated wherever the content control was pasted. (This was achieved using the Custom Part XML Editor addin for Word)

We have several different types of reports, and by copying the original document template we had several templates (*.docm) based on the original. This is not the best approach to templates as when I want to change the original template, it does not update the report templates.

I now have one Base Template: this has all the themes, building blocks, custom ribbon, macros, styles and has content controls mapped in xml. This template is 'attached' to each of the different report templates.

here is screen shot of the template added to a template - the file open is Prime Blank Report.dotm and has Prime Documents Styles and Tools v1.1.dotm (the Base Template) attached.

This works great, except for the content controls - these are not working like the original; when entering text in one content control, they are not updated in the other content boxes. In the Base Template the XML mapping is within "custom xml part (no namespace)". There is no custom xml part available in the report template that this the Base Template is attached to.

So my question is how to resolve this. Can a macro read the xml mapping from the original template and apply it to the current document i.e. create xml part (no namespace)? Would this even work. It is the linking of the different content controls that I want to be copied, not the contents of the content controls - the contents should be unique to each new document created from each template.

additional info - Word 2016, the templates are in Workgroup_templates on our shared dropbox.

1

1 Answer 1

1

I have a partial answer to my question, although it is not automated like I would want.

By renaming the document so that is is a .zip file, you can open it, open the folder CustomXml and find which xml file includes the mapping references that you want to replicate. This file can be copied into the zip version of the other file.

Once completed, renaming the file to .doc will revert it back from a zip.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.