Description of managing and distributing Outlook 2002 Visual Basic for Applications (VBA) projects
This article was previously published under Q290779
For a Microsoft Outlook 2000 version of this article, see 229911 (http://support.microsoft.com/kb/229911/).
SUMMARY
This article provides an overview of how Microsoft Outlook stores Microsoft Visual Basic for Applications code, and how you can manage multiple projects.
MORE INFORMATION
Unlike other Microsoft Office programs, Microsoft Outlook supports only one Visual Basic for Applications project at a time. The project, Project1, is available and associated with the program at all times. It is not possible to add another project in the Visual Basic Editor. Project1 is stored on your hard disk as VbaProject.OTM in the following folder:
<Drive>:\Windows\Application Data\Microsoft\Outlook
NOTE: The location of the Application Data folder may vary depending on the configuration of user profiles in Windows. To locate the file, use Windows to search your computer for the file VBAProject.otm.Outlook does not provide a direct means to manage OTM files. Outlook Visual Basic for Applications code was not designed to be deployed or distributed; it was designed solely to be a personal macro development environment. If you want to begin a new Visual Basic for Applications project, you could theoretically export all of your existing modules and forms, but this is typically not a realistic approach. Instead, follow these steps:
If you want to switch between projects, add one additional step to the previous steps:
IMPORTANT: Although you can do this, Microsoft Product Support Services cannot support deploying solutions in this way. There are known issues with doing this, and Outlook was not designed to support this functionality. For additional information, click the article number below to view the article in the Microsoft Knowledge Base: 290780 (http://support.microsoft.com/kb/290780/EN-US/) OL2002: Code Does Not Work After You Distribute a VBA Project
If you are developing a solution that you intend to distribute to more than a few people, you should convert your Visual Basic for Applications code into an Outlook COM Add-in. However, developing a COM Add-in typically requires considerable more programming knowledge than creating a short macro, so if your Visual Basic for Applications project is relatively simple, and there are not too many people that need to use it, you may want to send them the code with instructions on how to set it up. For additional information about finding resources to learn how to create a COM Add-in, click the article number below
to view the article in the Microsoft Knowledge Base:
291163 (http://support.microsoft.com/kb/291163/EN-US/) OL2002: How to Create a COM Add-in for Outlook
REFERENCESFor 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 (http://support.microsoft.com/kb/287530/EN-US/) OL2002: Questions About Custom Forms and Outlook Solutions
| Search Support(KB)Article Translations
|