title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
ContentControl.XMLMapping property (Word) |
vbawd10.chm266534916 |
|
|
3730e4b2-b69c-3428-6968-4a48a3dc0b93 |
06/08/2017 |
medium |
Returns an XMLMapping object that represents the mapping of a content control to XML data in the data store of a document. Read-only.
expression. XMLMapping
expression An expression that returns a ContentControl object.
The following example sets the built-in Author document property and adds a new content control to the active document, and then sets the mapping for the control to the value of the built-in document property.
Dim objCC As ContentControl
Dim objMap As XMLMapping
Dim blnMap As Boolean
ActiveDocument.BuiltInDocumentProperties("Author").Value = "David Jaffe"
Set objCC = ActiveDocument.ContentControls.Add _
(wdContentControlText, ActiveDocument.Paragraphs(1).Range)
Set objMap = objCC.XMLMapping
blnMap = objMap.SetMapping(XPath:="/ns1:coreProperties[1]/ns0:creator[1]")
If blnMap = False Then
MsgBox "Unable to map the content control."
End If
[!includeSupport and feedback]