Content control date picker linked to other locations in doc

SmallFry
StarLounger
Posts: 91
Joined: 02 Sep 2018, 23:12

Content control date picker linked to other locations in doc

Post by SmallFry »

Looking for some suggestions on how to achieve this. I have one date which I'm using a CC date picker. When this date is picked, I would like this date to replicate in two other areas in the document. One is in the body and one in the header.

I've experimented with bookmarks, StyleRef, but can't get these to work. I've also looked into VBA code with a DOCPROPERTY field, but there will not be any VBA in this document as it being saved from a main document to a standalone document.

Any thoughts?

User avatar
HansV
Administrator
Posts: 78448
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Content control date picker linked to other locations in

Post by HansV »

Click the three vertical dots of the data picker (or its title, if you specified one) to select the entire content control.
On the Insert tab of the ribbon, in the Links group, click Bookmark.
Assign a bookmark name, e.g. MyDate, then click Add.
Place the insertion point where you want to duplicate the date.
Press Ctrl+F9 to insert field brackets { } (do not type the brackets!).
Type the bookmark name, then press F9 to hide the field code and to update the result.

Note: when the user changes the date, the copy won't be updated immediately.
The user can select the copy or the entire document and press F9, or print / print preview the document to update it.
Best wishes,
Hans

SmallFry
StarLounger
Posts: 91
Joined: 02 Sep 2018, 23:12

Re: Content control date picker linked to other locations in

Post by SmallFry »

Thank you Hans. So with the F9, the liked filed will update, but the link in the header will only update with print preview. Surely some options to work with.

User avatar
HansV
Administrator
Posts: 78448
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Content control date picker linked to other locations in

Post by HansV »

The alternative would be VBA to update everything, but you didn't want to use that...
Best wishes,
Hans

SmallFry
StarLounger
Posts: 91
Joined: 02 Sep 2018, 23:12

Re: Content control date picker linked to other locations in

Post by SmallFry »

Hi Hans,

So I have options, could you provide VBA code that would update the Date Picker CC to two areas in the document? One in the body and one in the header!

User avatar
HansV
Administrator
Posts: 78448
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Content control date picker linked to other locations in

Post by HansV »

See Update All Document Fields for a macro that will update all fields in all parts of a document.
Best wishes,
Hans

User avatar
Charles Kenyon
5StarLounger
Posts: 615
Joined: 10 Jan 2016, 15:56
Location: Madison, Wisconsin

Re: Content control date picker linked to other locations in

Post by Charles Kenyon »

Consider using the Publish Date Document Property Control and rename/repurpose it instead of your current control. Copy and paste it. All copies will update the others.
http://addbalance.com/word/MappedControls.htm

Or, you could map your existing control. Then just copy and paste. Again, a change made to any of the clones is reflected in all.
http://gregmaxey.com/word_tip_pages/map ... trols.html
Greg Maxey and Graham Mayor both have free utilities to use for mapping controls.
http://gregmaxey.com/word_tip_pages/con ... tools.html
https://www.gmayor.com/insert_content_control_addin.htm

SmallFry
StarLounger
Posts: 91
Joined: 02 Sep 2018, 23:12

Re: Content control date picker linked to other locations in

Post by SmallFry »

Thank you Hans, works great. Also, thank you Charles. These are some great options as I simply have to present them to the boss and see which way is best to go.

One more question, is it rather difficult to map a content control from one document to another?

User avatar
Charles Kenyon
5StarLounger
Posts: 615
Joined: 10 Jan 2016, 15:56
Location: Madison, Wisconsin

Re: Content control date picker linked to other locations in

Post by Charles Kenyon »

One advantage of mapped controls is that the synchronization is instant and does not require any action by the user.

Mapped controls are written into the XML structure of the document.
SmallFry wrote:***
One more question, is it rather difficult to map a content control from one document to another?
Substantially more difficult. This is a different level. You can't do this without macros and even then, I would use something else.

The difficulty, though, is true of all of the methods discussed, they are within a document.

You may want to look into keeping your variable data in an Excel spreadsheet and using Mail Merge to update the documents.
https://support.office.com/en-us/articl ... 948fa3d7d3

Another option would be to combine logically different documents into different sections of the same document. Then all of the methods discussed would work because, to Word, they would be a single document.

SmallFry
StarLounger
Posts: 91
Joined: 02 Sep 2018, 23:12

Re: Content control date picker linked to other locations in

Post by SmallFry »

Hi Charles and thank you for the input.
Substantially more difficult. This is a different level. You can't do this without macros and even then, I would use something else.
I agree and will scrap this idea
Another option would be to combine logically different documents into different sections of the same document. Then all of the methods discussed would work because, to Word, they would be a single document.
Yes, this is my fist option as I'm looking at 10+ documents that will share decent portions of the same text. Once all of the documents are combined into one, I have some VBA to allow the user to separate the document by section into a new document. This will work fine.

I'm exploring Repeating Section Content Controls. I placed a content control in a section of the document and it will feed another section later on in the document. How can I link those? Also, when I add a section to the control, it also adds that section to the control that is later on in the document? Is there a good link to see this done?

User avatar
Charles Kenyon
5StarLounger
Posts: 615
Joined: 10 Jan 2016, 15:56
Location: Madison, Wisconsin

Re: Content control date picker linked to other locations in

Post by Charles Kenyon »

My use of the repeating section CC has been limited to contiguous spaces. I do not think it replicates content added after the section is repeated back to the first one.

Looking at Greg Maxey's Content Control Insert Utility, I see that it does allow such a control to be mapped.
https://gregmaxey.com/word_tip_pages/Co ... ialog.html

Again, to use it as a mapped control would involve copy and paste.

SmallFry
StarLounger
Posts: 91
Joined: 02 Sep 2018, 23:12

Re: Content control date picker linked to other locations in

Post by SmallFry »

Thanks again Charles and truly appreciated.