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

Posted on 2014-08-25
Last Modified: 2014-09-11
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?
Question by:itkadmin
    LVL 22

    Assisted Solution

    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.
    LVL 76

    Accepted Solution

    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.
    LVL 2

    Author Closing Comment

    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.

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Maximize Your Threat Intelligence Reporting

    Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

    There is a feature provided by MS Word that lets you create an Table of Contents for your Word document automatically. To use this feature for other documents there are two steps involved,   1.  Prepare your document for a table of contents (he…
    Shortcuts in Word Just the other day I had a training for Microsoft and they wanted me to show how well the new Windows and Office behaved on a touch device, which by the way is great, but it was only then that I realized that using keyboard shortc…
    In this video, we show how to convert an image-only PDF file into a PDF Searchable Image file, that is, a file with both the image (typically from scanning) and text, which is created in an automated fashion with Optical Character Recognition (OCR) …
    In a previous video Micro Tutorial here at Experts Exchange (, I explained how to get a free, one-month trial of Office …

    761 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    12 Experts available now in Live!

    Get 1:1 Help Now