The information in this article applies to:
SUMMARYIf you place a template file (.dot) in the Office Startup folder ("C:\Program Files\Microsoft Office\Office\Startup") and include an AutoExec macro in the template, you can add new menu items to the standard Word menus such as the File and Help menus. However, you cannot remove those menu items by resetting the menus in an AutoExit macro in the template. MORE INFORMATIONMicrosoft 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 a Microsoft Certified Solution Provider
or the Microsoft fee-based consulting line at (800) 936-5200. For more information about
Microsoft Certified Solution Providers, please see the following page on the World Wide Web:
http://www.microsoft.com/mcsp/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/overview/overview.asp For more information about using the sample code in this article, click the article number below to view the article in the Microsoft Knowledge Base: Q212536 OFF2000: How to Run Sample Code from Knowledge Base Articles When you start Word, AutoExec macros in templates that are in the Office Startup folder will run. Those macros may add new menu items to standard menus or add new menus, or both. These changes are made in the Normal.dot template. When you quit Word, the Normal.dot template is closed before any AutoExit macros run. Therefore, when you start Word again, the menu items added by the AutoExec macro may still be there, even if the AutoExit macro includes code similar to the following to reset menus:
The following steps illustrate how to create a template with AutoExec and AutoExit macros to add a new menu item to the File menu when Word starts and remove the menu item when Word closes.
C:\Program Files\Microsoft Office\Office\Startup
Additional query words: vba autoexec autoexit menu commandbars reset
Keywords : kbdta kbmacroexample kbwordvba wd2000 |
Last Reviewed: November 10, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |