A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

NewMailEx Only provides First e-mail in inbox



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old October 2nd 09, 04:16 PM posted to microsoft.public.outlook.program_vba
ben
external usenet poster
 
Posts: 4
Default NewMailEx Only provides First e-mail in inbox

When using NewMailEx to get a list of received e-mails, EntryIDCollection
will only return the very first e-mail received, even if 10-15 e-mails come
in at the same time.

This is my code in it's entirety.


Private Sub Application_NewMailEx(ByVal EntryIDCollection As String)
Dim arr() As String
Dim i As Integer
Dim m As MailItem
On Error Resume Next
arr = Split(EntryIDCollection, ",")
For i = 0 To UBound(arr)
Set m = Application.Session.GetItemFromID(arr(i))
MsgBox m.Subject
Next
End Sub


Or am I going at this backwards, does (Will return a list of all e-mails
that have arrived since this event last fired) mean that if I receive 5
e-mails, the first one will trigger.. but the next time I receive an e-mail
the previous 4 , plus the one just in will trigger? And if so, won't that
leave a few e-mails always in limbo?

--
When you lose your mind, you free your life.

 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The EntryID in NewMailEx Event Al_21_11[_2_] Add-ins for Outlook 1 July 2nd 09 02:07 PM
Problem using NewMailEx Trefor Outlook and VBA 10 May 30th 08 03:41 PM
NewMailEx Code runs only once... Rafael[_2_] Outlook - Using Forms 0 September 9th 07 03:10 AM
Sending mail from NewMailEx deletes the mail from the Inbox Ron Outlook and VBA 1 January 10th 07 07:40 PM
NewMailEx vs. ItemAdd Mark Rae Outlook and VBA 14 June 15th 06 03:07 PM


All times are GMT +1. The time now is 08:09 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.