OL2002: Code Does Not Work After You Distribute a VBA Project

Article translations Article translations
Article ID: 290780 - View products that this article applies to.
This article was previously published under Q290780
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

Symptoms

You create a Visual Basic for Applications project in Outlook, and copy the underlying VBAProject.otm file to other users' computers so they can use it. But after they start Outlook, the Application_Startup event doesn't fire, or other macro functionality does not work as expected.

Cause

When you start Outlook, the Visual Basic for Applications component is not activated unless you've previously activated one of the Macro commands on the Tools menu.

Resolution

After distributing the VBAProject.otm file, you must press ALT+F8 to activate the Macros windows, or press ALT+F11 to activate the Visual Basic Editor. You can then close either window, restart Outlook, and then the code will function correctly.

Status

This is a limitation of Outlook Visual Basic for Applications and there are no plans to change this behavior.

More information

Visual Basic for Applications projects in Outlook are not designed to be distributable to large numbers of users. If you need to distribute an Outlook solution that uses application-level events and features of the Outlook object model, you should consider creating an Outlook COM Add-in.

For additional information about creating a COM add-in, click the article number below to view the article in the Microsoft Knowledge Base:
291163 OL2002: How to Create a COM Add-in for Outlook

References

For additional information about working with the VBAProject.otm file, click the article number below to view the article in the Microsoft Knowledge Base:
290779 OL2002: Managing and Distributing Outlook VBA Projects
For additional information about available resources and answersto commonly asked questions about Microsoft Outlook solutions, click the article number below to view the article in the Microsoft Knowledge Base:
287530 OL2002: Questions About Custom Forms and Outlook Solutions

Properties

Article ID: 290780 - Last Review: October 26, 2013 - Revision: 2.0
Applies to
  • Microsoft Outlook 2002 Standard Edition
Keywords: 
kbnosurvey kbarchive kbbug kbnofix KB290780

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