次の方法で共有


ContentControl.XMLMapping プロパティ (Word)

コンテンツ コントロールと文書のデータ ストア内の XML データとのマッピングを表す XMLMapping オブジェクトを取得します。 値の取得のみ可能です。

構文

XMLMapping

ContentControl オブジェクトを返す式。

次の使用例は、組み込みの文書プロパティ Author を設定し、作業中の文書に新しいコンテンツ コントロールを追加した後、組み込みの文書プロパティの値へのコントロールのマッピングを設定します。

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

関連項目

ContentControl オブジェクト

サポートとフィードバック

Office VBA またはこの説明書に関するご質問やフィードバックがありますか? サポートの受け方およびフィードバックをお寄せいただく方法のガイダンスについては、Office VBA のサポートおよびフィードバックを参照してください。