Article ID: 224874 - Last Review: September 29, 2003 - Revision: 3.0 OL2000: Code Does Not Work After You Distribute a Visual Basic for Applications ProjectThis article was previously published under Q224874 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 does not 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 have 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 functions 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 how to create a COM add-in for Outlook, click the article number below
to view the article in the Microsoft Knowledge Base:
230225
(http://support.microsoft.com/kb/230225/EN-US/
)
OL2000: How to Create a COM Add-in for Outlook
REFERENCESFor additional information about working with the VBAProject.otm file, click the article number below
to view the article in the Microsoft Knowledge Base:
229911
(http://support.microsoft.com/kb/229911/EN-US/
)
OL2000: Managing and Distributing Outlook VBA Projects
For additional information about available resources and answersto commonly asked questions about Microsoft Outlook 2000 solutions, click the article number below
to view the article in the Microsoft Knowledge Base:
146636
(http://support.microsoft.com/kb/146636/EN-US/
)
OL2000: Questions About Custom Forms and Outlook Solutions
| Article Translations
|
Back to the top
