StoresEvents_12_Event.StoreAdd Event

Occurs when a Store has been added to the current session either programmatically or through user action.

Namespace:  Microsoft.Office.Interop.Outlook
Assembly:  Microsoft.Office.Interop.Outlook (in Microsoft.Office.Interop.Outlook.dll)

Syntax

'Declaration
Event StoreAdd As StoresEvents_12_StoreAddEventHandler
'Usage
Dim instance As StoresEvents_12_Event
Dim handler As StoresEvents_12_StoreAddEventHandler

AddHandler instance.StoreAdd, handler
event StoresEvents_12_StoreAddEventHandler StoreAdd

Remarks

Outlook must be running in order for this event to fire. This event will fire when any of the following occur:

  • A store is added through the Open Outlook Data File dialog box, by selecting Open and then Outlook Data File on the File menu.

  • A store is added through the Data Files tab of the Account Manager dialog box.

  • A store is added successfully by calling the _NameSpace.AddStore method.

This event will not fire when any of the following occurs:

  • When Outlook starts and opens a primary or delegate store.

  • If a store is added through the Mail applet in the Microsoft Windows Control Panel and Outlook is not running.

  • A delegate store is added through the Advanced tab of the Microsoft Exchange Server dialog box.

You can use this event to determine whether a store has been added and take appropriate actions on items in that store. Otherwise, you would have to resort to polling the Stores collection.

See Also

Reference

StoresEvents_12_Event Interface

StoresEvents_12_Event Members

Microsoft.Office.Interop.Outlook Namespace

Microsoft.Office.Interop.Outlook.StoresEvents_12_StoreAddEventHandler