Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 04-01-2023, 07:40 AM
WordUnknown WordUnknown is offline Can you use XML parts and Content Controls to update document A and B? Windows 11 Can you use XML parts and Content Controls to update document A and B? Office 2021
Novice
Can you use XML parts and Content Controls to update document A and B?
 
Join Date: Oct 2022
Posts: 5
WordUnknown is on a distinguished road
Default Can you use XML parts and Content Controls to update document A and B?

Hello all,




I've been playing around with XML parts and Content Controls which has saved me lots of work in a single document. Now I want to branch out and update multiple documents at the same time in a folder structure.

Hopefully this diagram explains what I mean.

Code:
Main Folder
- Folder 1
-- Document A
-- Document B
-- Document C
-- Folder 1A
---Document D
- Folder 2
-- Document A
-- Document B
-- Folder 2A
--- Document C
--- Folder 2A1
---- Document D
  • The Main Folder remains unchanged.
  • Each Folder 1,2* is a separate folder.
  • When updating Document A's content control, these changes are to be updated in all documents where applicable in it's separate Folder.
    For example, updating Document A in Folder 1, would update Document B, C and D in Folder 1A.

Is this something that can be accomplished?
Reply With Quote
  #2  
Old 04-01-2023, 04:13 PM
Charles Kenyon Charles Kenyon is offline Can you use XML parts and Content Controls to update document A and B? Windows 11 Can you use XML parts and Content Controls to update document A and B? Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

The XML parts are document-specific, not shared with other documents.
Something could be set up using macros.
Note though that mapped content controls are reciprocal within the document. Updating any one updates all copies. This would be very difficult for multiple documents.

For a non-vba solution, look at using, instead, Mail Merge, with a primary data set.

Last edited by Charles Kenyon; 04-02-2023 at 08:39 AM.
Reply With Quote
  #3  
Old 04-02-2023, 01:12 AM
Guessed's Avatar
Guessed Guessed is offline Can you use XML parts and Content Controls to update document A and B? Windows 10 Can you use XML parts and Content Controls to update document A and B? Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 3,977
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

Yes, it can be done via VBA if you have populated the XML file and it has a unique namespace. Your source document could be outside of Word but could also be any of the docs which contain a complete complement of the XML fields mapped to Content Controls which might appear across the suite of related documents.

The complexity would be determining which other Word docs need to be updated - this could be determined by either a list stored somewhere or by some 'rules' about what folders are related to the source document.
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia
Reply With Quote
  #4  
Old 04-05-2023, 11:58 AM
WordUnknown WordUnknown is offline Can you use XML parts and Content Controls to update document A and B? Windows 11 Can you use XML parts and Content Controls to update document A and B? Office 2021
Novice
Can you use XML parts and Content Controls to update document A and B?
 
Join Date: Oct 2022
Posts: 5
WordUnknown is on a distinguished road
Default

Quote:
Originally Posted by Charles Kenyon View Post
The XML parts are document-specific, not shared with other documents.
Something could be set up using macros.
Note though that mapped content controls are reciprocal within the document. Updating any one updates all copies. This would be very difficult for multiple documents.

For a non-vba solution, look at using, instead, Mail Merge, with a primary data set.
I'll have a look at mail merge but my work computers are quite locked down in terms of adding plugins / programs.
Reply With Quote
  #5  
Old 04-05-2023, 11:59 AM
WordUnknown WordUnknown is offline Can you use XML parts and Content Controls to update document A and B? Windows 11 Can you use XML parts and Content Controls to update document A and B? Office 2021
Novice
Can you use XML parts and Content Controls to update document A and B?
 
Join Date: Oct 2022
Posts: 5
WordUnknown is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
Yes, it can be done via VBA if you have populated the XML file and it has a unique namespace. Your source document could be outside of Word but could also be any of the docs which contain a complete complement of the XML fields mapped to Content Controls which might appear across the suite of related documents.

The complexity would be determining which other Word docs need to be updated - this could be determined by either a list stored somewhere or by some 'rules' about what folders are related to the source document.
I wouldn't even know where to start with VBA for editing multiple documents, might just have to stick with updating each file.
Reply With Quote
  #6  
Old 04-05-2023, 08:23 PM
Charles Kenyon Charles Kenyon is offline Can you use XML parts and Content Controls to update document A and B? Windows 11 Can you use XML parts and Content Controls to update document A and B? Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,140
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

When I want common elements in multiple documents, I use Mail Merge.
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to use content controls to populate text throughout the same document? WordUnknown Word 6 11-01-2022 11:08 AM
Loop and Update Content Controls with value vss712 Word VBA 7 08-27-2015 08:56 PM
More than one content controls in a word document lucky16 Word VBA 6 07-10-2014 08:34 AM
How to protect all parts of a document not in a content control? XmisterIS Word 2 05-20-2014 04:59 AM
Using both rich and plain content controls in one document Erica.Black Word 0 06-18-2013 10:33 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:44 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft