WD: How to Create an Automated Form with Fill-in Fields
ID: Q187813
|
The information in this article applies to:
-
Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
-
Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
-
Microsoft Word for Windows NT, version 6.0
-
Microsoft Word for Windows 95, versions 7.0, 7.0a
SUMMARY
This article describes how to create a simple form that automatically
prompts a user to fill in information.
MORE INFORMATION
Follow these steps to create a template with automatic fill-in fields:
- On the File menu, click New.
- Select Blank Document. (In Word 6.x, select the Normal template.)
- Under Create New, select Template (In Word 6.x, select New Template).
Click OK.
- Create the Fill-in Fields.
There are two methods you can use to create fill-in fields: menus and
keystrokes. Select the method best suited for you.
Method 1: Creating a Field Using the Menus:
- Position the insertion point where you want to insert the
text field.
- On the Insert menu, click Field.
- In the Categories list, select Mail Merge.
- In the Field Names list, select Fill-in.
- The FILLIN field is displayed in the Field Codes text
box below the Categories list. Click inside of the text box
to the right of the word FILLIN and type quotation marks
around the prompt you want to display. For example, use the
following syntax to display a prompt asking the user to enter
their name:
FILLIN "Please enter your first and last name."
- Click OK. You will see a sample of the prompt. Click OK
to return to your document.
NOTE: To view the field code you just inserted, press
ALT+F9 (Windows) or OPTION+F9 (Macintosh).
- Repeat steps a-f for every place in the document where you want
a fill-in field.
Method 2: Creating a Field Using Keystrokes.
- Position the insertion point where you want to insert the field.
- Press CTRL+F9 (Windows) or COMMAND+F9 (Macintosh). Field
braces, { }, appear in the document.
- Position the insertion point inside the field braces.
- Type the following, where <prompt> is what Word asks the
user to type:
FILLIN "<prompt>"
NOTE: If you press F9 while the insertion point is still on
the field, you can see a sample of the prompt that will be
displayed. This step is not necessary to create the fill-in.
- On the File menu, click Save As.
- Name the template appropriately.
NOTE: The template needs to be saved in the directory that contains your
user templates. To locate where your User Templates are stored, on the
Tools menu, click Options and click the File Locations tab.
NOTE: In Word 6.x for the Macintosh, the template must be saved in the
Microsoft Office:Templates folder and be accessed through the File:New
command within Word for the Fillin fields to activate.
- Create an Automated Macro that automatically updates the fields
when you open a new document based on the template. To create the
macro, follow these steps:
Microsoft provides programming examples for illustration only, without
warranty either expressed or implied, including, but not limited to, the
implied warranties of merchantability and/or fitness for a particular
purpose. This article assumes that you are familiar with the programming
language being demonstrated and the tools used to create and debug
procedures. Microsoft support professionals can help explain the functionality
of a particular procedure, but they will not modify these examples to
provide added functionality or construct procedures to meet your specific
needs. If you have limited programming experience, you may want to contact
the Microsoft fee-based consulting line at (800) 936-5200. For more
information about the support options available from Microsoft, please see
the following page on the World Wide Web:
http://www.microsoft.com/support/supportnet/refguide/ - On the Tools menu, click Macro.
- Type AutoNew for the Macro Name.
- In the Macros Available In list, select the template name you are
using.
- Click Create.
- Type the following code:
Sub Main
EditSelectAll
UpdateFields
EndofDocument
End Sub
- On the File menu, click Close. When prompted to save changes to your
template, click Yes.
After you have finished creating all of the required fill-in fields,
text for the template, and the macro to automatically run, close and save the template. On the File menu, click Close. When prompted to save changes to your template, click Yes.
Using the Template
To create new documents based on the new template, follow these steps.
- On the File menu, click New.
- Click to select your template.
- Click OK.
Word creates a new document, automatically searches for all fill-in fields
in the document and begins to prompt the user for input.
Additional Information
For additional information about creating online forms with form fields,
please see the following article in the Microsoft Knowledge Base:
Q187864 WD: How to Create an Online Form Using Form Fields
You can also use SET and ASK fields in conjunction with fill-in fields.
REFERENCES
"Microsoft Word User's Guide," version 6.0, Chapter 14 Forms
"Microsoft Word for Windows User's Guide," version 2.0, pages 480-484
Additional query words:
fillin field fields forms auto keyboard merge automatic automatically
Keywords : kbdta wordnt kbfield ntword word6 word95
Version : MACINTOSH:6.0,6.0.1,6.0.1a; WINDOWS:6.0,6.0a,6.0c,7.0,7.0a; winnt:6.0
Platform : MACINTOSH WINDOWS winnt
Issue type : kbinfo
|