Results 1 to 8 of 8
  1. #1
    Lounger
    Join Date
    Aug 2001
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Auto-populate Form fields? (WORD 2000)

    I would like to insert fields into the document that would Only need to be filled once. For instance, can I create a form field called CUSTOMER NAME, and have a salesperson enter the customer's name in the first instance of the field...and have every other instance of the field called CUSTOMER NAME automatically display the customer's name? I actually need to create three of these...one for the name of the customer, and two others that are repeated 20 or 30X in the document.

    And yes, find and replace would be a viable alternative...if the person(s) who will actually use this document knew how to operate word!!!

    Help?

  2. #2
    Silver Lounger
    Join Date
    Jun 2001
    Location
    Morden, Surrey, United Kingdom
    Posts
    1,838
    Thanks
    3
    Thanked 0 Times in 0 Posts

    Re: Auto-populate Form fields? (WORD 2000)

    Yes, you can do that; you need to create a SET field. To do this:
    <UL><LI>Press Ctrl-F9 to create a form field
    <LI>Type 'SET CustomerName' (without the quotes and where CustomerName is the name of the field you want to put in)
    <LI> Press Ctrl-F9 again
    <LI>Type FILLIN "Enter Customer Name" and move the cursor outside both sets of curly brackets[/list]You should now have a code as follows: { SET CustomerName { FILLIN "Enter Customer Name" } } . This sets up the SET command.

    Now, everywhere where you want the contents of the fillin field CustomerName to appear including where you placed the SET field if necessary:
    <UL><LI>Press Ctrl-F9
    <LI>Type CustomerName and move outside the curly brackets[/list]So it looks like this: { CustomerName }. When the template is run, the user is asked to fill in the field once and Word places the contents each time you have said it should.

    The original SET command can be placed anywhere as long as it is before the first time it's used (you might want to put it right at the top of the document to keep it out of the way).

    HTH
    Beryl M


  3. #3
    BAM
    Guest

    Re: Auto-populate Form fields? (WORD 2000)

    If you are using Word form fields then you can simply add a cross-reference for the duplicate entries.

    First, double-click the form fields that you wish to cross-reference and change the Bookmark name to one that is a little more meaningful. While you are there turn on "Calculate on exit" so when the Customer name is filled in Word will update the cross reference fields.

    Once this is complete and you wish to add a cross-reference:

    - Click Insert/Cross-reference
    - Change the Reference type to Bookmark
    - Select the correct Bookmark from the list
    - Click the Insert command

    Also note that you can leave the Cross-reference dialog box open and work back and forth between the document and the dialog box.
    ~~~~~~~~~~~~
    Cheers! <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>

  4. #4
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto-populate Form fields? (WORD 2000)

    BAM,

    When I've done this, I've had to update the fields before the change "takes". I've had to have this macro run on exit from a form field which updates other fields:

    Public Sub RefreshFields()
    ActiveDocument.Fields.Update
    End Sub

    Is there a better way?
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  5. #5
    BAM
    Guest

    Re: Auto-populate Form fields? (WORD 2000)

    Hi Geoff,

    Yes there is a better way. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

    In the properties of the form field that supports the cross-reference turn on "Calculate on exit". This will automatically update all fields without the need for a macro.
    ~~~~~~~~~~~
    Cheers! <img src=/S/flags/USA.gif border=0 alt=USA width=30 height=18>

  6. #6
    Platinum Lounger
    Join Date
    Dec 2000
    Location
    Queanbeyan, New South Wales, Australia
    Posts
    3,730
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto-populate Form fields? (WORD 2000)

    Thanks BAM. Much quicker- quite noticable on a large form.
    Subway Belconnen- home of the Signboard to make you smile. Get (almost) daily updates- follow SubwayBelconnen on Twitter.

  7. #7
    Lounger
    Join Date
    Aug 2001
    Posts
    37
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Auto-populate Form fields? (WORD 2000)

    Where do you turn on "Calculate on exit?"
    Also, with the first method here, the template only asks for the update once. Is there a way to ensure that it asks for a customer name every time you open it? And finally, how is a salesperson expected to find this template, once it is dropped into the template folder?

  8. #8
    Silver Lounger Charles Kenyon's Avatar
    Join Date
    Jan 2001
    Location
    Sun Prairie, Wisconsin, Wisconsin, USA
    Posts
    2,049
    Thanks
    124
    Thanked 119 Times in 116 Posts

    Re: Auto-populate Form fields? (WORD 2000)

    Calculate on exit is a "property" of each form field. With your template open and not "protected" for forms, double-click on a field and its properties window will open. The name is misleading because it really should be "update anything that uses this field upon exit."

    By design, templates are used to create new documents. A new document should be created for each customer. If you use Save As from the file menu and save as a template, the default location is your user templates folder. Any folders within the templates folder will show up as "tabs" in the File => New dialog box. If you are on a network, you probably want to be saving the template in the workgroup templates folder on your network (or a subfolder). See: <A target="_blank" HREF=http://www.addbalance.com/usersguide/templates.htm> Template Basics</A> (addbalance.com/usersguide/templates.htm) for more on templates (user and workgroup), document templates, global templates and Normal.dot. This also includes how the files are organized under File New and the location of template folders which varies not only by version of Word but also by operating system.

    Once your people get used to using the template to create a new document rather than reusing an old document, the only asks once feature shouldn't be a problem. If for some reason it is still a problem, write back and I'll give you some ideas. (Most people have a different problem, that it runs too many times!)

    You may also want to take a look at <A target="_blank" HREF=http://www.addbalance.com/word/templatesmenu.htm> A menu of favorite templates in Word</A> (addbalance.com/word/templatesmenu.htm). This will answer your questions about how to use /find the template.

    For more on forms, follow the links on <A target="_blank" HREF=http://www.addbalance.com/word/wordwebresources.htm#Forms>Web Resources - Forms</A>.

    Hope this helps,
    Charles Kyle Kenyon
    Madison, Wisconsin

Posting Permissions

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