Once you have XML parts in the document, you can link individual XML elements/attributes in that data to content controls in the document as follows:

Adding a new mapped content control

If you don't already have a content control in the document, you can add one that's mapped to a specific XML node as follows:

Via Right-Click

You can insert the mapped content control from the right-click menu:
  1. Right-click the element or attribute you want to map to
  2. Click Insert Content Control
  3. Click the type of content control you want to insert
    • Note: If the XML part has an associated schema in Word's Schema Library, the data type of that element defines a default value, listed above all of the other options.
Picture of the context menu entry, and a drop-down content control that appears when you click it.
At this point, the new content control is inserted wherever your cursor is.

Via Drag and Drop

You can also insert the mapped content control by simply dragging and dropping the node into the document:
  1. Start dragging the XML element or attribute you want to map to
  2. Drop it at the location in the document where you want to insert the mapped content control

Mapping an existing content control

If you already have the content control in the document, you can map it to a specific XML node as follows:
  1. Place your cursor inside the content control you want to map
  2. Right-click the element or attribute you want to map to
  3. Click Map to content control
At this point, the content control is mapped to the selected XML node. You can also unmap the content control by clicking Map to content control again, unchecking it.

Last edited Sep 14, 2011 at 8:25 PM by tristand, version 3

Comments

No comments yet.