Dela via


ContentControl.XMLMapping Property

Gets an XMLMapping that represents the binding between the ContentControl and an element in a custom XML part.

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

Syntax

'Declaration
ReadOnly Property XMLMapping As XMLMapping
XMLMapping XMLMapping { get; }

Property Value

Type: Microsoft.Office.Interop.Word.XMLMapping
An object that represents the binding between the ContentControl and an element in a custom XML part.

Exceptions

Exception Condition
COMException

The Type property has the value Microsoft.Office.Interop.Word.WdContentControlType.wdContentControlBuildingBlockGallery, Microsoft.Office.Interop.Word.WdContentControlType.wdContentControlGroup or Microsoft.Office.Interop.Word.WdContentControlType.wdContentControlRichText.

Remarks

Use the XMLMapping property to bind a ContentControl to an element in a piece of XML (also named custom XML part) that is embedded in the document. For more information, see Content Controls and Custom XML Parts Overview.

You cannot bind building block gallery controls, group controls, and rich text controls to custom XML parts.

.NET Framework Security

See Also

Reference

ContentControl Interface

Microsoft.Office.Tools.Word Namespace

Other Resources

Content Controls

Custom XML Parts Overview

Walkthrough: Binding Content Controls to Custom XML Parts