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
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.
See Also
Reference
Microsoft.Office.Tools.Word Namespace