Microsoft KB Archive/292176

= OL2002: VBA Code Does Not Run, or Causes Security Warning to Appear =

Article ID: 292176

Article Last Modified on 2/26/2004

-

APPLIES TO


 * Microsoft Outlook 2002 Standard Edition

-



This article was previously published under Q292176





SYMPTOMS
Code that you created in Microsoft Visual Basic for Applications does not run, or you receive the following warning when you start Outlook:

ThisOutlookSession contains Macros. Macros may contain viruses. It is always safe to disable macros, but if the macros are legitimate, you might lose some functionality.



CAUSE
Your macro security settings are set to Medium or High.



RESOLUTION
Either set your macro security settings to Low, or digitally sign your Visual Basic for Applications project so that it is considered trusted. To change your security setting, click the Tools menu, click Macro, and then click Security.



STATUS
This problem is a limitation of how Visual Basic for Applications and its related security features are implemented in Outlook.



MORE INFORMATION
Outlook uses the same Visual Basic for Applications security features as the other Microsoft Office programs. In those programs, you can store Visual Basic for Applications code within individual files that can be transferred from computer to computer.

In Outlook, there is only one Visual Basic for Applications project that is not designed to be transferred to other computers. Because Outlook uses the same macro security features as the other Office applications, the same security architecture is applied to Outlook, even though you cannot receive macros without creating them yourself.

NOTE: In Outlook, various windows, errors, warnings, and Help topics mention the term &quot;documents.&quot; This also is a side-effect of Outlook using the same Visual Basic for Applications and security features as the other Office programs. These references typically do not apply to Outlook.

For additional information about how Visual Basic for Application is implemented in Outlook, click the article number below to view the article in the Microsoft Knowledge Base:

290779 OL2002: Managing and Distributing Outlook VBA Projects

