Microsoft KB Archive/222240

From BetaArchive Wiki
Knowledge Base


OL2002: Events Do Not Run in Visual Basic for Applications If a Modal Window Is Open

Article ID: 222240

Article Last Modified on 3/1/2004



APPLIES TO

  • Microsoft Outlook 2002 Standard Edition
  • Microsoft Outlook 2000 Standard Edition



This article was previously published under Q222240

SYMPTOMS

If you implement events in Microsoft Outlook Microsoft Visual Basic for Applications (VBA), the events may not run when Outlook has a modal window open. For example, if an Outlook object model security warning window is displayed while an item arrives in your Inbox, the ItemAdd event may not run.

WORKAROUND

To work around this behavior:

  • If possible, avoid having modal windows displayed. -or-

  • Implement your solution as a Component Object Model (COM) add-in, because events run from Microsoft Visual Basic or other development environments.For additional information about how to develop a COM add-in for Outlook, 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


MORE INFORMATION

This behavior is a limitation of VBA. Because this behavior is a limitation of VBA, this behavior might theoretically affect other Microsoft Office programs. However, in those programs scenarios in which events run when a modal window is open do not occur.

In Outlook, you can still receive incoming mail and have a reminder displayed, even if modal windows are displayed. The object model contains events for both of these situations.

REFERENCES

For additional information about available resources and answersto commonly asked questions about Microsoft Outlook solutions, click the article numbers below to view the articles in the Microsoft Knowledge Base:

287530 OL2002: Questions About Custom Forms and Outlook Solutions


146636 OL2000: Questions About Custom Forms and Outlook Solutions



Additional query words: OL2K OutSol OutSol2000 OutSol2002

Keywords: kbprb KB222240