OL2000: How to Assign a Macro to a Toolbar Button

Article translations Article translations
Article ID: 252426 - View products that this article applies to.
Expand all | Collapse all

On This Page

Summary

This article describes how you can assign a Microsoft Outlook Visual Basic for Applications macro to a toolbar button.

More information

In Outlook, you can create Visual Basic for Applications macros that use the Outlook object model to perform certain tasks. If you want to easily run the macro at any time, you can assign the macro to a toolbar button so that you can click the button to run the macro.

NOTE: Since Visual Basic for Applications is considered "applciation-level" code, you should add the toolbar button to the Outlook Standard toolbar and not the toolbars on items.

To Create the Toolbar Button

  1. On the View menu, point to Toolbars, and click Customize.
  2. On the Commands tab, in the Categories list, click Macros.
  3. Drag the appropriate macro name to a toolbar. In most cases, the name will be prefixed by Project1.ThisOutlookSession, unless you created the macro in another module instead of the ThisOutlookSession module.
  4. With the toolbar button selected, click Modify Selection in the Customize list, to make changes to the appearance of the button. This will allow you to remove the prefix and modify the way the toolbar button is displayed. For example, you can change this setting so that only an icon is displayed on the toolbar instead of text.
  5. Click Close.
For additional information about assigning a macro to a shortcut key, click the article number below to view the article in the Microsoft Knowledge Base:
252427 OL2000: How to Assign a Macro to a Shortcut Key

References

For additional information about available resources and answersto commonly asked questions about Outlook solutions, click the article number below to view the article in the Microsoft Knowledge Base:
146636 OL2000: Questions About Custom Forms and Outlook Solutions

Properties

Article ID: 252426 - Last Review: June 19, 2014 - Revision: 4.0
Applies to
  • Microsoft Outlook 2000 Standard Edition
Keywords: 
kbhowto KB252426

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com