0

I'm looking to adapt this official MS-Word Template document to our company's needs, but I can't locate the source for the variables-in place and how they're managed.

Here's an example Content-Control, the red '000', that has no data on how it was mapped.

This was a great read but I still can't find where and how the variables on this document are sourced and linked together. 'alt-F9' shows me the existing document-field code implementations, but I believe these are mapped XML schemas that aren't discernable from the MS word user interface. How do I view and edit the existing mapped XML schemas? (If that is what they are)

Thank you.

1 Answer 1

1

What you are asking could be the subject of a book.

Normally here we try to give answers but not write books. Content Controls can be linked or mapped to XML nodes but are not required to be so linked. The key through the user Interface is the Developer Tab and possibly the "document properties" found under Insert > Quick Parts which are discussed in the second reference link below.

That template could definitely be improved by using mapped content controls for information that is entered in multiple places. One of these could also be used to have the client name and other information in the footer or header.

Here are some references:

I recommend starting with the first three unless you are already into VSTO solutions. They show how to work through the user interface of Word rather than external coding.

Here are free Add-Ins that make mapping Content Controls relatively simple. They are from Greg Maxey and Graham Mayor.

Other Thoughts

In your question, you are conflating variables, fields, and Content Controls. My answer deals with Content Controls, which are not fields and which can relate to variable information. Here is a list of the usual Word Fields with links to documentation. Document Properties can also hold variable information which can be shown in a DocProperty Field. These document properties are different, though from the ones discussed in my article and are not linked or mapped to XML.

Work on Content Controls through the User Interface is best done using the Windows desktop application

The Macintosh interface currently does not encompass creation or modification of Content Controls. It can be done through vba, though. At some point this may change but it has been more than ten years waiting for Microsoft to add this to their Mac versions. (March 2022) Content Controls for the Mac OS by John Korchok

2
  • I think I'm going to have to go down the XML variable rabbit hole with Visual studio. I was hoping that Microsoft's official default templates wouldn't require any serious under-the-hood work, but it looks like that's how the document was built. Thank you.
    – Nate W
    Commented Mar 11, 2022 at 0:51
  • Please look at my edited answer. I've provided links to three free utilities for Mapping Content Controls without you needing to delve into the XML. There are more on Greg Maxey's site linked from his main page about Content Controls. Commented Mar 11, 2022 at 4:02

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .