Results 1 to 7 of 7
  1. #1
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    134
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Creating field in form to repeat in a header

    I am creating a form and would like certain information which is entered into the body of the form to be repeated in the header.

    Example:

    The form will refer to "Order Number __________", where the user fill in the field with the current order number. I also want this number to appear in the header (along with a lot of additional information that doesn't change). Is it possible to do that in Word 2010?

    Thanks.

  2. #2
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts
    One way to do this is to use a StyleRef field in the header. To do this:

    • First, (with the form unprotected) select the formfield that the order number is going to get entered into.
    • Create a new Character Style (called, let's say, OrderNum) and make sure it's applied to the formfield only. This character style doesn't need to have any formatting properties different from the underlying paragraph style; we're just using it to mark the text that is needed to appear in the header.
    • In the header, go to Insert > Quick Parts > Field, and insert a StyleRef field. Select 'OrderNum' from the Style Name list.

    When you protect the form and enter something in the order number formfield, that entry will automatically appear in the field in the header, and will update in real time if you make changes to the formfield entry.

    Gary

  3. The Following User Says Thank You to Gary Frieder For This Useful Post:

    Caniac (2011-05-06)

  4. #3
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    134
    Thanks
    1
    Thanked 0 Times in 0 Posts
    Thank you so much for your reply! That works perfectly!

  5. #4
    New Lounger
    Join Date
    Jun 2011
    Posts
    1
    Thanks
    0
    Thanked 1 Time in 1 Post

    Tutorial

    If you require more than a few repeated fields, there is a great tool to modify the XML of the Word document to create custom fields and link to them. Here is a tutorial: http://www.johnchapman.name/using-co...and-word-2010/

  6. The Following User Says Thank You to chapmanjw For This Useful Post:

    PamCaswell (2011-06-25)

  7. #5
    Bronze Lounger
    Join Date
    Jan 2001
    Location
    La Jolla, CA
    Posts
    1,469
    Thanks
    30
    Thanked 61 Times in 57 Posts
    Gary, your response prompted my question. I don't see in creating a new character style the option or ability to use a field code for the style. Is that possible? I often use an overbar in documents and use the field code to create that. It would be nice if I could have an overbar style handle that automatically for selected text. Thanks in advance for any thoughts on this.

  8. #6
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts
    Sorry for the delay in responding. I think you're correct that there's no way to include a field code as part of a style definition. But what you could do is create a macro that would save you the steps of creating the field code each time. Alternatively, you could create the field code once and save it as an autotext/building block so that it can be quickly inserted each time you need it.

    Gary

  9. #7
    Super Moderator
    Join Date
    Dec 2000
    Location
    New York, NY
    Posts
    2,970
    Thanks
    3
    Thanked 29 Times in 27 Posts
    John,

    Welcome to the Lounge! Thanks for posting a link to your interesting tutorial - I don't think many people here (myself included) were aware of that tool from CodePlex - am looking forward to a chance to sit down and try out working with it.

    Gary

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •