Skip to content

Latest commit

 

History

History
55 lines (34 loc) · 1.4 KB

Word.ContentControl.XMLMapping.md

File metadata and controls

55 lines (34 loc) · 1.4 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
ContentControl.XMLMapping property (Word)
vbawd10.chm266534916
vbawd10.chm266534916
Word.ContentControl.XMLMapping
3730e4b2-b69c-3428-6968-4a48a3dc0b93
06/08/2017
medium

ContentControl.XMLMapping property (Word)

Returns an XMLMapping object that represents the mapping of a content control to XML data in the data store of a document. Read-only.

Syntax

expression. XMLMapping

expression An expression that returns a ContentControl object.

Example

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

See also

ContentControl Object

[!includeSupport and feedback]