Entry Macro Runs Before AutoNew Macro in Protected Form

Last reviewed: February 5, 1998
Article ID: Q113291
6.00 6.00a WINDOWS kbusage kbmacro

The information in this article applies to:

  • Microsoft Word for Windows, versions 6.0, 6.0a

SYMPTOMS

When you create a document based on a template that is protected for forms, Word for Windows runs the Entry macro in the first FORM field before it runs an AutoNew macro. The Entry macro runs before both global and template- based AutoNew macros.

If there is no Entry macro in the first FORM field, the AutoNew macro runs first, as usual.

STATUS

We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.

WORKAROUND

If you need to run the AutoNew macro before the first Entry macro runs in a document based on a template that is protected for forms, you can run AutoNew from your Entry macro using the following procedure:

  1. Rename the AutoNew macro to a name that Word does not recognize as automatic (for example, rename AutoNew to NotAutoNew). See page 754 in the "Microsoft Word User's Guide" for instructions on renaming a macro.

    Note: Macro names are not case sensitive.

  2. Open the Entry macro for the first FORM field. To find the name of the Entry macro assigned to that FORM field, double-click the field to open the Text Form Field Options dialog box.

  3. Add the new name of the AutoNew macro to the beginning of your Entry macro, after the "Sub MAIN" line. The following is a sample Entry macro that first runs a renamed AutoNew macro:

          Sub MAIN
          NotAutoNew
          MsgBox "Type your name here."
          End Sub
    
    

REFERENCES

"Microsoft Word User's Guide," version 6.0, pages 318-319, 754


KBCategory: kbusage kbmacro
KBSubcategory: kbtemplate
Additional reference words: 6.00 6.00a autonew runs first macro form fields
word6 winword autoentry auto-entry run macro on
Keywords : kbtemplate
Version : 6.00 6.00a
Platform : WINDOWS


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: February 5, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.