View Single Post
 
Old 09-24-2018, 03:52 AM
EvaMads EvaMads is offline Windows 10 Office 2016
Novice
 
Join Date: Sep 2018
Location: Copenhagen
Posts: 5
EvaMads is on a distinguished road
Default Get value from Content control from SharePoint document

I have a Word-document which is created in SharePoint. In VBA I get the value from various Content Controls like this:

aProjName = ActiveDocument.ContentTypeProperties("Project name").Value

No problem – I works like a dream.

With the XML Mapping Pane on the Developer-tab, I can see the Content Controls are in
http://schemas.microsoft.com/office/...ata/properties


The problem is to get the value of a Content Control from
http://schemas.microsoft.com/office/...ta/ContentType

I can right-click on the name and insert the content control in the document, but I cannot figure out how to get the value with VBA. Can anyone help?
Attached Images
File Type: gif Custom XML mapping.gif (7.1 KB, 38 views)
Reply With Quote