WD98: How to Create an Automated Form with Fill-in Fields (187814)



The information in this article applies to:

  • Microsoft Word 98 Macintosh Edition

This article was previously published under Q187814

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:

  1. On the File menu, click New.
  2. Select Blank Document.
  3. Under Create New, select Template. Click OK.
  4. 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:

    1. Position the insertion point where you want to insert the text field.
    2. On the Insert menu, click Field.
    3. In the Categories list, select Mail Merge.
    4. In the Field Names list, select Fill-in.
    5. 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."

    6. 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 OPTION+F9.
    7. Repeat steps a-f for every place in the document where you want a fill-in field.
    Method 2: Creating a Field Using Keystrokes.
    1. Position the insertion point where you want to insert the field.
    2. Press COMMAND+F9. Field braces, { }, appear in the document.
    3. Position the insertion point inside the field braces.
    4. 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.
  5. On the File menu, click Save As.
  6. Name the template appropriately.

Create the Automated Macro

Microsoft provides programming examples for illustration only, without warranty either expressed or implied. This includes, but is not limited to, the implied warranties of merchantability or fitness for a particular purpose. This article assumes that you are familiar with the programming language that is being demonstrated and with the tools that are used to create and to debug procedures. Microsoft support engineers 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 requirements. Word 98 Macintosh Edition does not require a macro to automatically update FILLIN fields. When creating a new document based on the template created here, Word automatically updates and displays the FILLIN field.

The following Visual Basic for Applications macro is provided for illustrative purposes only and should not be used within an AutoNew macro. If this macro is included in the template created earlier, the FILLIN field will update and display twice.
   Sub AutoNew()
      ActiveDocument.Fields.Update
   End Sub
				

Using the Template

To create new documents based on the new template, follow these steps.

  1. On the File menu, click New.
  2. Click to select your template.
  3. 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:

187551 WD98: How to Create an Online Form Using Form Fields

You can also use SET and ASK fields in conjunction with fill-in fields.

REFERENCES

For more information about SET fields, click Contents And Index on the Help menu (or on the Balloon Help menu if you are using a version of the Macintosh operating system earlier than 8.0), click the Index button in Word Help, type the following text

SET field

and then click Show Topics. Select the "Examples of SET fields" topic, and click Go To. If you are unable to find the information you need, ask the Office Assistant.

For more information about ASK fields, click Contents And Index on the Help menu (or on the Balloon Help menu if you are using a version of the Macintosh operating system earlier than 8.0), click the Index button in Word Help, type the following text

ASK field

and then click Show Topics. Select the "Examples of ASK and FILLIN fields" topic, and click Go To. If you are unable to find the information you need, ask the Office Assistant.

NOTE: If the Assistant is hidden, click the Office Assistant button on the Standard toolbar. If Word Help is not installed on your computer, please see the following article in the Microsoft Knowledge Base:

179216 OFF98: How to Use the Microsoft Office Installer Program


Modification Type:MajorLast Reviewed:6/17/2005
Keywords:kbfield kbhowto KB187814