XMLMapping.CustomXMLPart Property

Definition

Returns a CustomXMLPart object that represents the custom XML part to which the content control in the document maps.

public:
 property Microsoft::Office::Core::CustomXMLPart ^ CustomXMLPart { Microsoft::Office::Core::CustomXMLPart ^ get(); };
public Microsoft.Office.Core.CustomXMLPart CustomXMLPart { get; }
member this.CustomXMLPart : Microsoft.Office.Core.CustomXMLPart
Public ReadOnly Property CustomXMLPart As CustomXMLPart

Property Value

Examples

The following example accesses the first content control in the active document and the custom XML part to which it is mapped, and then sets the text value of one of the XML nodes contained within the custom XML part.

Note: This example assumes that at least one content control in the active document is mapped to a custom XML part that contains the XML nodes specified in the XPath string.

<span class="label">Dim objCC As ContentControl































































































































Dim objPart As CustomXMLPart































































































































Dim objNode As CustomXMLNode































































































































































































































































Set objCC = ActiveDocument.ContentControls(1)































































































































Set objPart = objCC.XMLMapping.</span>
<span class="label">CustomXMLPart</span>
<span class="label">Set objNode = objPart.SelectSingleNode("/books/book/title")objNode.Text = "Mystery of the Empty Chair"</span>

Applies to