Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Getting started with auto-population of fields (P

    (Edited by HansV to provide link to post - see <!help=19>Help 19<!/help>)

    This is a GREAT forum.

    I need some help getting started on a new project. I have a 15 page enrollment document used for HR purposes. The enrollment package is used for several entities and needs to be customized by business name and address for each client. There are several (20-30) fields that need to be auto-updated (i.e Company Name, Address, Primary Contact, etc) throughout the document.

    I would like to have a "parameters" cover sheet and then have the document auto-populate once the parameters are set. I have reading a few posts and can see that it can be done, but I dont understand HOW to get it done.

    Here is one thread <post#=401715>post 401715</post#>

    So, I look at the attachments and the documents work, but how to I get to the screen that allow me to see the underlying code so I can build the filed references throughout my current document?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Getting started with auto-population of fields (P

    Welcome to Woody's Lounge!

    The document attached to <post#=401715>post 401715</post#> is protected for forms. To see how it is designed, select Tools | Unprotect Document.
    The fields (gray boxes) on the first page are all text formfields from the Forms toolbar. If you double-click one of these formfields, you'll see a dialog with options for the formfield. Note the bookmark name - this is important since it is used to refer to the formfield on the second page. Also note that the 'Calculate on exit' check box has been ticked. This means that references to the formfield elsewhere in the document will be updated automatically the moment the user tabs or clicks out of the formfield.

    Most of the fields on the second page are REF fields that refer to the value of a formfield (more exactly, of a bookmark) on the first page. If you right-click one of them and select Toggle Field Codes from the popup menu, you'll see something like

    { REF Team1 h * MERGEFORMAT }

    The { } are field braces - you shouldn't type those yourself but let Word create them (in this example through Insert | Reference | Cross Reference...)
    REF means that the field refers to a bookmark; Team1 is the bookmark name (of a formfield on page 1)
    h means that the field acts as a hyperlink, but that isn't relevant here because hyperlinks don't work in a protected document.
    * MERGEFORMAT means that formatting of the field will be preserved if it is updated. Again, not relevant here.
    Right-click and select Toggle Field Codes again to hide the field codes.

    Don't forget to protect the document for forms again when you're done. This can be done through Tools | Protect Document... or more conveniently by clicking the Lock button on the Forms toolbar.

    Note: the fields in the last two columns of the table on page two are more formfields. You will note that the bookmark name for these has not always been filled in; this was not needed because there are no references to them.

    Good luck!

  3. #3
    New Lounger
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Getting started with auto-population of fields

    Thanks for the fast reply!

    Ok, I am learning here.

    If I want to create some master fields that will auto-populate throughout the document, the first thing I need to do is to:

    1) make sure the document is unlocked
    2) create a "text form field"
    3) right click -> properties
    4) in "Field Settings" give the bookmark a name
    5) select (confirm) "calculate on exit" is selected

    Then, to have the auto populate actually work. What do I need to do?

    In the body of the document, I have tried inserting a bookmark, and inserting a cross-reference; but both appear to do nothing once I try to put some data in the master field.

  4. #4
    Plutonium Lounger
    Join Date
    Nov 2001
    Posts
    10,550
    Thanks
    0
    Thanked 7 Times in 7 Posts

    Re: Getting started with auto-population of fields

    If you created a formfield on the first page with a bookmark called "MyData" then you cound add a copy of that information somewhere else in the document by inserting a cross-reference to the bookmark "MyData".

    When you have finished designing your document you should Protect the document for Forms (reverse the process you used to unprotect it). Now try putting some data in a formfield on the first page and it should appear wherever you have a cross-reference to that bookmark.

    StuartR

  5. #5
    New Lounger
    Join Date
    Jan 2008
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Getting started with auto-population of fields

    Thank for the help everyone.

    I just realized the form was working; I just did not know how to make it auto-update. All that needed to happen was for me to cursor out of the field and it updated.

    I am sure I'll be back for bone-headed questions soon!

Posting Permissions

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