How To use Data from a form field in word as a document footer.

I am working on building a template document for reports.
On the cover of the report, We have a space to enter title and a date

These fields were created using Rich Text Controls in the Design Mode under Developer.

The fields are called title and date.

I would like the information the staff member enters on the cover page to populate the footer on subsequent pages with whatever was entered into the form fields on the cover page.

Is there a way to do this? If so, how?
LVL 2
itkadminAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

FlysterCommented:
One way to do that is to use a macro. Place two text boxes in the footer (Developer Tab - Control Box - ActiveX Controls - Text Box). Go to the visual basic editor (Alt+f11), highlight "This Document" and select View Code. Paste in the following:

Sub UpdateFields()
  Me.TextBox1.Value = ActiveDocument.ContentControls(1).Range
  Me.TextBox2.Value = ActiveDocument.ContentControls(2).Range
End Sub

You may have to modify the ContentControls numbers (1) to match your title and date fields.
Flyster
0
GrahamSkanRetiredCommented:
Another way would be to use StyleRef fields.

Create two new styles from the current style of each Content Control, e.g. Styel1 & Style2, Set the style of each control to one of each style.

In the footer, place two StyleRef fields (Insert tab, Text group, Quick Parts dropdown, Field... Item) and set each StyleRef field to refer to the relevant style.
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
itkadminAuthor Commented:
Both solutions worked. I went with the second one as it doesn't use macros. I liked the first better because it provides more control, but it uses macros. The problem with that is some staff use the online version of word which doesn't work well with macros and some staff were thrown off by having to enable macros in a document.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Word

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.