View Single Post
 
Old 05-20-2021, 08:31 PM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,184
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

Charles

Here is a demonstration of the principle. Note that the template itself contains the embedded xml already so the building blocks inserted all link to that data. If you create new documents from this template then they also contain the xml file which can be modified by virtue of the link to a CC on the page. If you use this template as an addin, the document you want to insert the building blocks into must ALSO have the xml embedded but this is a secondary step that needs to be taken.

You could use a docx which contains the xml as your 'template' for new documents if you really wanted to keep the building blocks in a global template. This is the reasoning of why I suggested the OP would do a SaveAs for each of the subsequent docs - each new document already contains the populated metadata in an embedded xml file.

And in the case of the template you put in post 3, you could inject the following xml file into a legacy document to allow the CC to find its value mapped to the CC1 field.

<CC_Map_Root xmlns="http://Greg_Maxey/CC_Mapping_Part"><mapNode_1></mapNode_1><mapNode_2></mapNode_2><mapNode_3></mapNode_3><mapParentNode_1><nestedMapNode_1></nestedMapNode_1><nestedMapNode_2></nestedMapNode_2></mapParentNode_1><CC1>This is big a test</CC1></CC_Map_Root>
Attached Files
File Type: dotx Mapped Content Control Demonstration.dotx (37.6 KB, 9 views)
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote