The information in this article applies to:
SUMMARYThis article describes how you can assign an Outlook Visual Basic for Applications macro to a shortcut key. MORE INFORMATION
You can create Visual Basic for Applications macros that use the Outlook object model to perform certain tasks. You can assign the macro to a shortcut key to easily run the macro at any time. Use the Shortcut Keys for MenusYou can customize the toolbar or a menu by adding a macro.For additional information about how to add a macro to a toolbar or menu, click the article number below to view the article in the Microsoft Knowledge Base: Q252426 OL2000: How to Assign a Macro to a Toolbar ButtonWhen you add the macro to the menu, be sure to precede one of the letters in the name with an ampersand (&). This makes that letter a shortcut key and the letter appears underlined on the menu. You can run the macro by using two separate key combinations, the first to select the menu, and the second to run the macro on the menu. For example, assume that you create a macro to do a search and replace operation on your contacts. You name the macro "UpdateContacts," add the macro to the Tools menu, and specify that the name of the menu command is "Upd&ate Contacts." Note the ampersand precedes the letter "a" in the name that will appear on the menu. To run this macro using the keyboard, use two key combinations. First, press ALT+T to open the Tools menu, and then press A to run the macro. Use the Shortcut Keys for Toolbar ButtonsThe only way to use a single shortcut key is to use the above approach, but add the command or button to a toolbar, instead of a menu. This method can have some adverse side effects and must be implemented carefully and with the expectation that you may not be successful.The following issues should be taken into account:
REFERENCESFor additional information about available resources and answers to commonly asked questions about Microsoft Outlook solutions, click the article number below to view the article in the Microsoft Knowledge Base: Q146636 OL2000: Questions About Custom Forms and Outlook Solutions Additional query words: OutSol OutSol2000 OL2K hotkey
Keywords : |
Last Reviewed: February 1, 2000 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |