XMLMapping.CustomXMLNode Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Returns a CustomXMLNode object that represents the custom XML node in the data store to which the content control in the document maps.
public:
property Microsoft::Office::Core::CustomXMLNode ^ CustomXMLNode { Microsoft::Office::Core::CustomXMLNode ^ get(); };
public Microsoft.Office.Core.CustomXMLNode CustomXMLNode { get; }
member this.CustomXMLNode : Microsoft.Office.Core.CustomXMLNode
Public ReadOnly Property CustomXMLNode As CustomXMLNode
Property Value
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.
<span class="label">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.</span>
<span class="label">CustomXMLNode</span>
<span class="label">objNode.Text = "Matt Hink"objCC.Range.Text = objNode.Text</span>
Applies to
Commenti e suggerimenti
https://aka.ms/ContentUserFeedback.
Presto disponibile: Nel corso del 2024 verranno gradualmente disattivati i problemi di GitHub come meccanismo di feedback per il contenuto e ciò verrà sostituito con un nuovo sistema di feedback. Per altre informazioni, vedereInvia e visualizza il feedback per