OL2000: Code Doesn't Work After Distributing Visual Basic for Applications Project

ID: Q224874


The information in this article applies to:
  • Microsoft Outlook 2000


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

Microsoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article.


MORE INFORMATION

Visual Basic for Applications projects in Outlook are not fully 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.


REFERENCES

For additional information about working with the VBAProject.otm file, please see the following article in the Microsoft Knowledge Base:

Q229911 OL2000: Managing and Distributing Outlook VBA Projects

For additional information about available resources and answers to commonly asked questions about Microsoft Outlook 2000 solutions, please see the following article in the Microsoft Knowledge Base:
Q146636 OL2000: Questions About Custom Forms and Outlook Solutions

Additional query words: OutSol OutSol2000 OL2K

Keywords : kbdta
Version : WINDOWS:2000
Platform : WINDOWS
Issue type : kbbug


Last Reviewed: June 8, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.