Automate your form

Microsoft Office Word 2003

Show All Show All

Automate your form

You can automate a form by saving macros in the form template. The macros can run automatically when the insertion point enters or exits a form field. For example, if a user selects a Married check box, an exit macro can activate other related fields, such as Name of Spouse.

Note  This procedure applies to forms whose controls you inserted by using the Forms toolbar.

  1. Open the template that contains the form you want to change.
  2. Remove protection from the form template by clicking Protect Form Button image on the Forms toolbar.
  3. Create the macros you want to use, and store them in the form template.

    If another template contains macros you want to use, copy them into the form template.

    Security  Use caution when you are adding macros to your form. Macros may be designed in such a way that their use could pose a security risk. We recommend that you use macros from trusted sources only.

  4. Double-click the form field you want to assign a macro to.
  5. To run a macro when the insertion point enters the form field, click the macro in the Entry box.

    To run a macro when the insertion point exits the form field, click the macro in the Exit box.

Note  If you store the entry and exit macros in your Normal template and then distribute a form to others, the entry and exit macros may not run because the macros won't be available to the users. You must store the macros that you use in the form in the form template.