Share via


XMLMapping.CustomXMLNode Property

Returns a CustomXMLNode object that represents the custom XML node in the data store to which the content control in the document maps.

Namespace:  Microsoft.Office.Interop.Word
Assembly:  Microsoft.Office.Interop.Word (in Microsoft.Office.Interop.Word.dll)

Syntax

'Declaration
ReadOnly Property CustomXMLNode As CustomXMLNode
    Get
'Usage
Dim instance As XMLMapping
Dim value As CustomXMLNode

value = instance.CustomXMLNode
CustomXMLNode CustomXMLNode { get; }

Property Value

Type: CustomXMLNode

Examples

The following example inserts a new content control and custom XML part into the active document, maps the content control to a node in the custom XML part, and then sets the value of the mapped XML node.

Dim objCC As ContentControl































































































































Dim objPart As CustomXMLPart































































































































Dim objNode As CustomXMLNode































































































































Dim objMap As XMLMapping































































































































































































































































Set objCC = ActiveDocument.ContentControls.Add(wdContentControlText)































































































































Set objPart = ActiveDocument.CustomXMLParts.Add("<books><book>" & _































































































































    "<author></author><title></title><genre></genre><price></price>" & _































































































































    "<pub_date></pub_date><abstract></abstract></book></books>")































































































































































































































































Set objMap = objCC.XMLMapping































































































































objMap.SetMapping "/books/book/author", , objPart































































































































































































































































Set objNode = objMap.CustomXMLNodeobjNode.Text = "Matt Hink"objCC.Range.Text = objNode.Text

See Also

Reference

XMLMapping Interface

XMLMapping Members

Microsoft.Office.Interop.Word Namespace