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

    Repeating a Form in a Document (Word 2002 SP3)

    Is there a way to have a form repeat in the same document without physically cutting and pasting?

    What I have is a form that users with various degrees of Word expertise will need to fill out. Usually, they will need to fill out more than one copy of the form (for example, one form for building 387, one form for building 388, etc.). Ideally, all of the copies of the filled-out form should be grouped together in one document, but I can't figure out how to do that.

    Any ideas will be totally appreciated.

  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Repeating a Form in a Document (Word 2002 SP3)

    This reminds me of a recent thread on letting the user select a number of repetitions of something, and then inserting them all into the document so the user could fill them in. A search might turn that up and it would be useful because otherwise you would be hard pressed to duplicate content without copying and pasting it.

    There is a special issue with Word's form fields. Each has a unique name that you can use to reference their contents, either in the document itself (using a REF field), or in a macro. If you don't need to do either of those things, then you should have no worries re-inserting the identical design over and over: Word will automatically resolve any name conflicts. However, if you need to know the names in advance so you can refer to them elsewhere, it's much trickier.

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

    Re: Repeating a Form in a Document (Word 2002 SP3)

    See the thread starting at <post:=567,572>post 567,572</post:> - it deals with adding a specifiable number of copies of a form to a document.

  4. #4
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    134
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Repeating a Form in a Document (Word 2002 SP3)

    Thanks. Unfortunately, that's all way beyond my comprehension <img src=/S/confused.gif border=0 alt=confused width=15 height=20> I tried putting the form into autotext as a start, but when I inserted it back into the document, the formatting was messed up.

    Would it help if I attach a copy of the form? What we need to do is fill a form for each building in each facility. The number of buildings vary, so other than creating a separate document for each building and merging them afterward (which I don't want to do), or creating a document template with 100 or so pages and deleting the ones we don't use - is there any fairly easy (for a novice VBA person) to automate the process?

    Again - thanks for any help.
    Attached Files Attached Files

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

    Re: Repeating a Form in a Document (Word 2002 SP3)

    See if the attached template (zipped) does what you want. I have moved the form to an autotext entry, and added a simple userform to ask the user how many forms to insert.
    Attached Files Attached Files

  6. #6
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    134
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Repeating a Form in a Document (Word 2002 SP3)

    HansV, you are AWESOME! That's perfect! I can't thank you enough for the help!

    Is this something difficult to do? I can definitely think of other potential uses for something like this.

    Thank you again!!

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

    Re: Repeating a Form in a Document (Word 2002 SP3)

    Okay, one more question. How would I access the basic form if I wanted to make any changes, such as header or footer?

    Thank you again.

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

    Re: Repeating a Form in a Document (Word 2002 SP3)

    Creating a simple userform is not very difficult - select Insert | Userform in the Visual Basic Editor, then use the Toolbox (toolbar) to place controls such as text boxes and command buttons on the form. Double click a control to write code for it. you can view the design of the userform and the code in the Visual Basic Editor.

  9. #9
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    134
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Repeating a Form in a Document (Word 2002 SP3)

    Thanks, Hans.

    What I really want to know is where the original form is stored. When I open the form you modified, I get the control box asking how many forms to create. That works wonderfully. But I need to actually modify a part of the form and I can't figure out where the original form is stored. If you could point me in that direction, I will be all set.

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

    Re: Repeating a Form in a Document (Word 2002 SP3)

    It's stored in the template as an AutoText entry named Form. If you want to edit it:
    - Open the template.
    - Type Form and press Enter. This will insert the AutoText entry.
    - Modify the form as needed.
    - Select the form.
    - Select Insert | AutoText | AutoText...
    - Make sure that the template is selected in the Look in box.
    - Type (or select) Form as name.
    - Click Add, and confirm that you want to redefine the AutoText entry.
    - Delete the contents of the template.
    - Save and close the template.

  11. #11
    2 Star Lounger
    Join Date
    Nov 2002
    Posts
    134
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Re: Repeating a Form in a Document (Word 2002 SP3)

    Hans,

    I appreciate all of your help with this. Everything is working fine! Thank you!

Posting Permissions

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