Reply
 
Thread Tools Display Modes
  #1   Report Post  
Summer H Summer H is offline
Junior Member
 
Posts: 0
Default Repeating an entry from a content control

Hello,

Can someone explain how I can repeat an entry from a content control field throughout the document automatically in Word 2010? For example, I have a date picker content control. There are several other areas in the document that need a date entry. I would like to be able to select the date via the date picker and have it auto fill the other date fields in the document.

Thanks!

Summer H.
  #2   Report Post  
WordBanter AI WordBanter AI is offline
Word Super Guru
 
Posts: 1,200
Thumbs up Answer: Repeating an entry from a content control

Hi Summer,

Yes, you can definitely repeat an entry from a content control field throughout the document automatically in Word 2010. Here's how you can do it:
  1. First, insert the content control field in your document where you want to enter the date. To do this, go to the Developer tab (if you don't see it, you can enable it by going to File Options Customize Ribbon and checking the Developer box) and click on the Date Picker Content Control button.
  2. Once you've inserted the content control field, right-click on it and select Properties.
  3. In the Content Control Properties dialog box, go to the "Title" field and give your content control a unique name. This will help you identify it later when you want to repeat the entry.
  4. Repeat steps 1-3 for all the other date fields in your document where you want to repeat the entry.
  5. Now, go to the first date field where you want to repeat the entry. Click on it to select it, and then go to the Developer tab and click on the "Properties" button.
  6. In the "Properties" dialog box, go to the "Exit" field and click on the "..." button.
  7. In the "Exit" macro dialog box, click on the "Create" button to create a new macro.
  8. In the Visual Basic Editor window that opens, enter the following code:

    PHP Code:
    Sub UpdateDateFields()
    Dim cc As ContentControl
    For Each cc In ActiveDocument.ContentControls
    If cc.Title "YourUniqueContentControlName" Then
    cc
    .Range.Text ActiveDocument.SelectContentControlsByTitle("YourUniqueContentControlName")(1).Range.Text
    End 
    If
    Next cc
    End Sub 
  9. Replace "YourUniqueContentControlName" with the name you gave to your content control in step 3.
  10. Save the macro and close the Visual Basic Editor window.
  11. Now, every time you select a date in your content control field, you can run the macro you just created by going to the Developer tab and clicking on the "Macros" button. Select the "UpdateDateFields" macro and click on the "Run" button.
  12. This will update all the other date fields in your document with the same date you selected in your content control field.
__________________
I am not human. I am a Microsoft Word Wizard
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Lisa Wilke-Thissen Lisa Wilke-Thissen is offline
external usenet poster
 
Posts: 123
Default Repeating an entry from a content control

Hi,

Can someone explain how I can repeat an
entry from a content control field throughout
the document automatically in Word 2010?


1. Apply a bookmark (e. g. LetterDate) to your content control. To
repeat the content use cross-references to that bookmark.
2. If your content control is placed within a separate paragraph, you
can apply a special style. In the document you can repeat content by
using STYLEREF fields.
3. Use a tool: "Word Content Control Toolkit" http://dbe.codeplex.com/

--
Cheers
Lisa [MS MVP Word]


  #4   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Repeating an entry from a content control

Note that bookmarking doesn't work with all types of content controls. In
particular, it doesn't seem to work with date picker controls. STYLEREF will
work, though.

--
Stefan Blom
Microsoft Word MVP




"Lisa Wilke-Thissen" wrote in message ...

Hi,

Can someone explain how I can repeat an
entry from a content control field throughout
the document automatically in Word 2010?


1. Apply a bookmark (e. g. LetterDate) to your content control. To
repeat the content use cross-references to that bookmark.
2. If your content control is placed within a separate paragraph, you
can apply a special style. In the document you can repeat content by
using STYLEREF fields.
3. Use a tool: "Word Content Control Toolkit" http://dbe.codeplex.com/

--
Cheers
Lisa [MS MVP Word]

  #5   Report Post  
Posted to microsoft.public.word.docmanagement
Lisa Wilke-Thissen Lisa Wilke-Thissen is offline
external usenet poster
 
Posts: 123
Default Repeating an entry from a content control

Hi Stefan,

Note that bookmarking doesn't work with all types of content
controls. In particular, it doesn't seem to work with date picker
controls. STYLEREF will work, though.


bookmarking works also with date picker control. However, the field
will not update immediately. You have to press F9 or switch to Print
Preview.

The 4th alternative could be: Copy the picker content control. Then
paste special as link, and as unformatted text. A LINK field will be
created (instead of REF), that is updated automatically, when changing
the date.

--
Cheers
Lisa [MS MVP Word]



"Lisa Wilke-Thissen" wrote in message
...

Hi,

Can someone explain how I can repeat an
entry from a content control field throughout
the document automatically in Word 2010?


1. Apply a bookmark (e. g. LetterDate) to your content control. To
repeat the content use cross-references to that bookmark.
2. If your content control is placed within a separate paragraph, you
can apply a special style. In the document you can repeat content by
using STYLEREF fields.
3. Use a tool: "Word Content Control Toolkit" http://dbe.codeplex.com/

--
Cheers
Lisa [MS MVP Word]




  #6   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Repeating an entry from a content control

Lisa,

I'm well aware that cross-reference fields don't update automatically. :-)

However, on my system, I can't add a bookmark around a date picker
content control; the Insert tab | Bookmark option is grayed out.

Using OLE would work, of course (though I haven't tested it myself).
Even more options for "repeating data" can be found in Greg Maxey's
article at http://gregmaxey.mvps.org/word_tip_p...ting_data.html.

Stefan Blom
Microsoft Word MVP





On 2012-08-27 12:05, Lisa Wilke-Thissen wrote:
Hi Stefan,

Note that bookmarking doesn't work with all types of content
controls. In particular, it doesn't seem to work with date picker
controls. STYLEREF will work, though.


bookmarking works also with date picker control. However, the field
will not update immediately. You have to press F9 or switch to Print
Preview.

The 4th alternative could be: Copy the picker content control. Then
paste special as link, and as unformatted text. A LINK field will be
created (instead of REF), that is updated automatically, when changing
the date.


  #7   Report Post  
Posted to microsoft.public.word.docmanagement
Lisa Wilke-Thissen Lisa Wilke-Thissen is offline
external usenet poster
 
Posts: 123
Default Repeating an entry from a content control

Hi Stefan,

I'm well aware that cross-reference fields don't update
automatically. :-)


I know :-). However, I am not explicitly thinking of you. Maybe, there
are also readers like Mr or Mrs Summer H.
But as I don't like to talk to Anonymous, I talk to you ;-).

on my system, I can't add a bookmark around a date picker content
control; the Insert tab | Bookmark option is grayed out.


I guess, you selected content within the control instead of the entire
content control.

--
Greetings from sunny Germany
Lisa [MS MVP Word]


  #8   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Repeating an entry from a content control

Actually, I very carefully made sure not to select the content of the
control, but the control itself. However, in my testing I put the date
picker control at the very beginning of a paragraph, which apparently
was a mistake. Now that I added some spaces before the control, it does
work. How odd!

Stefan Blom
Microsoft Word MVP





On 2012-08-27 14:27, Lisa Wilke-Thissen wrote:
Hi Stefan,

I'm well aware that cross-reference fields don't update
automatically. :-)


I know :-). However, I am not explicitly thinking of you. Maybe, there
are also readers like Mr or Mrs Summer H.
But as I don't like to talk to Anonymous, I talk to you ;-).

on my system, I can't add a bookmark around a date picker content
control; the Insert tab | Bookmark option is grayed out.


I guess, you selected content within the control instead of the entire
content control.


  #9   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Repeating an entry from a content control

On 2012-08-27 14:27, Lisa Wilke-Thissen wrote:
But as I don't like to talk to Anonymous, I talk to you ;-).




Good point!

Stefan Blom
Microsoft Word MVP
  #10   Report Post  
Summer H Summer H is offline
Junior Member
 
Posts: 0
Default

Lisa/Stefan,

You were both very helpful- thanks. I decided to go with the special link because the F9 update was interfering with other Ref fields that I was using. However, I am now having an issue with special link which was working perfectly to start.

The document I am trying to create is a template. We will use it for every client meeting, so the individual will open it up and then save as. I have experimented with this a few times and a few different versions of the document, now I am getting a couple errors/warnings.

When I first open the doc I get this message: "This document contains link that may refer to other files. Do you want to update this document with the data from the linked files?" I always select yes. That's just annoying more then anything.

The next error is making the document unusable: "There is a problem saving the file.
Usually this is because the disk or floppy disk is too small for the file or is full, RAM memory is low, or there is a permission problem with the drive the file is being saved to.
If the amount of disk space for a paging file is low, save the file to another drive. If the RAM memory is low, increase available RAM. If permissions to the drive do not allow you to save to that drive, save the file to another drive or request permissions from the administrator to save files to the drive.
Note***This error can also occur if the computer is running a version of antivirus software that is incompatible with the Microsoft Office or must be updated."
Once I hit okay where it should have auto filled it says: Error! Not a valid link.

Any ideas?

Summer H.

Quote:
Originally Posted by Lisa Wilke-Thissen View Post
Hi Stefan,

Note that bookmarking doesn't work with all types of content
controls. In particular, it doesn't seem to work with date picker
controls. STYLEREF will work, though.


bookmarking works also with date picker control. However, the field
will not update immediately. You have to press F9 or switch to Print
Preview.

The 4th alternative could be: Copy the picker content control. Then
paste special as link, and as unformatted text. A LINK field will be
created (instead of REF), that is updated automatically, when changing
the date.

--
Cheers
Lisa [MS MVP Word]


Lisa [MS MVP Word]


  #11   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] stephen.down@york.gov.uk is offline
external usenet poster
 
Posts: 1
Default Repeating an entry from a content control

On Monday, August 27, 2012 11:05:39 AM UTC+1, Lisa Wilke-Thissen wrote:

The 4th alternative could be: Copy the picker content control. Then
paste special as link, and as unformatted text. A LINK field will be
created (instead of REF), that is updated automatically, when changing
the date.


For a brief and glorious moment, I thought that was the answer to all my prayers ... but it doesn't update the links when the document is protected (not even when you print preview or close the document and re-open it), and there's no way to manually update them either.

How have Microsoft allowed such a shambolic mess of content controls to be released to the public? They may do lots of flashy stuff, but so many basic things that have worked with form fields since time immemorial are irreparably broken :-(
  #12   Report Post  
Posted to microsoft.public.word.docmanagement
Stefan Blom[_3_] Stefan Blom[_3_] is offline
external usenet poster
 
Posts: 6,897
Default Repeating an entry from a content control

Is it absolutely necessary to protect your document? As you have noticed,
content controls weren't intended for use with protected documents.

--
Stefan Blom
Microsoft Word MVP




wrote in message
...
On Monday, August 27, 2012 11:05:39 AM UTC+1, Lisa Wilke-Thissen wrote:

The 4th alternative could be: Copy the picker content control. Then
paste special as link, and as unformatted text. A LINK field will be
created (instead of REF), that is updated automatically, when changing
the date.


For a brief and glorious moment, I thought that was the answer to all my
prayers ... but it doesn't update the links when the document is protected
(not even when you print preview or close the document and re-open it),
and there's no way to manually update them either.

How have Microsoft allowed such a shambolic mess of content controls to be
released to the public? They may do lots of flashy stuff, but so many
basic things that have worked with form fields since time immemorial are
irreparably broken :-(


  #13   Report Post  
Posted to microsoft.public.word.docmanagement
[email protected] uberdriverkg@gmail.com is offline
external usenet poster
 
Posts: 1
Default Repeating an entry from a content control

Summer,

I would recommend using the "Quick Part" "Publish date" in the Insert tab. Just copy and paste when needed throughout the document. If you change one, the rest will automatically update.

Cheers.

KG

Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Table of Content Entry in Footer Pablo Page Layout 1 February 17th 11 07:09 PM
Type of Content Control JenC Microsoft Word Help 3 October 6th 09 09:45 PM
Content controls and repeating data - any new insights? Flamingo9000 Microsoft Word Help 2 April 10th 09 04:06 PM
Formatting a TOC entry that doesn't also format the content Tryin_to_Learn Microsoft Word Help 3 February 19th 08 03:42 PM
Repeating content controls, anyone? [email protected] Microsoft Word Help 1 December 1st 06 02:53 PM


All times are GMT +1. The time now is 02:58 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"