Incorporating Form Macros

3 4

In some cases, you might want an action the user selects to execute a macro you've added to the form. You can add a macro to your form template just as you would add one to any other document. Here are the steps:

  1. Open the template to which you want to add the macro.
  2. Click the field you want to use, and click Protect Form on the Forms toolbar to unprotect the field.
  3. Double-click the field to display its Form Field Options dialog box.
  4. Select the macro you want to use by making a choice in the Run Macro On section of the dialog box:
    • If you want the macro to execute when the user enters, or selects, the field, click the Entry down arrow and choose the macro you want to use from the drop down list. (See Figure 36-16.) The macros displayed in the drop-down list as those that are available in the document you are currently using.
    • If you want the macro to execute after the user exits, or deselects, the field, click the Exit down arrow and choose the macro from the list.
  5. Click OK to close the dialog box and save the settings.
  6. Click Protect Form to protect the form once again. The macro is now enabled and will execute according to your selections when the user accesses the field.

figure 36-16. choose whether you want word to execute a macro when the user accesses or exits the field.

Figure 36-16. Choose whether you want Word to execute a macro when the user accesses or exits the field.


Troubleshooting

I Don't Have Any Macros in the Entry or Exit Drop-Down Lists

If you can't locate the macros you want to add, the trouble could be that you haven't added those macros to the current form. To add the macro to the current document, follow these steps:

  1. Choose Tools, Templates And Add-Ins. The Templates And Add-Ins dialog box appears.
  2. Click the Organizer button.
  3. Click the Styles tab.
  4. Click Close File on the left side of the dialog box; then click Open File and select the name of the file containing the macro you want to use.
  5. Select the macro you want to use in the list on the left, and click Copy. The item is placed in the list on the right side of the dialog box.
  6. Click Close to save the change and return to the document.



Microsoft Word Version 2002 Inside Out
Microsoft Word Version 2002 Inside Out (Inside Out (Microsoft))
ISBN: 0735612781
EAN: 2147483647
Year: 2005
Pages: 337

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net