|Outlook Developer Reference|
expression A variable that represents an Application object.
|EntryIDCollection||Required||String||A string representing an Entry ID of an item received in the Inbox.|
This event is not available in Microsoft Visual Basic Scripting Edition (VBScript).
This event fires for e-mail accounts that provide notifications for received messages, such as Microsoft Exchange Server and POP3 accounts.
The NewMailEx event fires when a new message arrives in the Inbox and before client rule processing occurs. You can use the Entry ID returned in the
For users with an online Exchange Server account (non-Cached Exchange Mode), the event will fire only if Outlook is running. The event will not fire for the items that are received using an online Exchange Server account when Outlook is not running.
For users using Cached Exchange Mode, the event will fire in all settings: Download Full Items, Download Headers, and Download Headers and then Full Items.
The following Microsoft Visual Basic for Applications (VBA) example demonstrates how the NewMailEx event passes an entry ID. The event will fire when an item is received in the Inbox. Note that for backward compatibility when running this code sample on versions of Outlook earlier than Microsoft Office Outlook 2007, this code sample also accepts as parameter a string that contains more than one comma-delimited Entry IDs for items that have been received in the Inbox since the last time the event was fired.
|Visual Basic for Applications|