![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Hi,
I'm trying to use Outlook 2003's Application_NewMailEx event to copy all incoming messages into various folders etc. I've pretty much lifted the code directly from he http://msdn.microsoft.com/library/de...hatsNew2k3.asp The actual mechanism certainly works, but intermittently it won't pick up one or more of the incoming messages. E.g. if there is only one incoming message, then it works perfectly. However, if there are quite a few, as is common when I launch Outlook first thing in the morning and there could be up to 50 new emails, then typically this event seems to process only about 80% of them at random. Is this a known issue? Would I be better off using the ItemAdd event instead? Any assistance gratefully received. Mark |
#2
|
|||
|
|||
![]()
Both events will fail at around 16 or more items coming in at the same time.
It's a known thing due to the underlying MAPI notification limitations and there are no real workarounds other than scanning the Inbox at intervals to sweep items that might have been missed. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Mark Rae" wrote in message ... Hi, I'm trying to use Outlook 2003's Application_NewMailEx event to copy all incoming messages into various folders etc. I've pretty much lifted the code directly from he http://msdn.microsoft.com/library/de...hatsNew2k3.asp The actual mechanism certainly works, but intermittently it won't pick up one or more of the incoming messages. E.g. if there is only one incoming message, then it works perfectly. However, if there are quite a few, as is common when I launch Outlook first thing in the morning and there could be up to 50 new emails, then typically this event seems to process only about 80% of them at random. Is this a known issue? Would I be better off using the ItemAdd event instead? Any assistance gratefully received. Mark |
#3
|
|||
|
|||
![]()
"Ken Slovak - [MVP - Outlook]" wrote in message
... Both events will fail at around 16 or more items coming in at the same time. It's a known thing due to the underlying MAPI notification limitations I see... there are no real workarounds other than scanning the Inbox at intervals to sweep items that might have been missed. What's the most efficient way of doing that? By that, I mean that scanning the Inbox is simple enough, but how do you remember which MailItem objects in the Inbox have been processed from one sweep to the next? I don't really want any sort of database functionality here... |
#4
|
|||
|
|||
![]()
Set a user property on items you've processed.
-- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "Mark Rae" wrote in message ... "Ken Slovak - [MVP - Outlook]" wrote in message ... Both events will fail at around 16 or more items coming in at the same time. It's a known thing due to the underlying MAPI notification limitations I see... there are no real workarounds other than scanning the Inbox at intervals to sweep items that might have been missed. What's the most efficient way of doing that? By that, I mean that scanning the Inbox is simple enough, but how do you remember which MailItem objects in the Inbox have been processed from one sweep to the next? I don't really want any sort of database functionality here... |
#5
|
|||
|
|||
![]()
Hi
I've tried it with just 2 new emails (not 16) but event was raised just for the second. I think that this event raised only once per "Send/Recieve All" action. Is this correct? |
#6
|
|||
|
|||
![]()
Well, yes but so what? You get a string that is a collection of the
EntryID's of every email that came in during that operation, separated by commas. So if you split the string on commas your array should hold the id's of every item that came in. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "tbo" wrote in message ... Hi I've tried it with just 2 new emails (not 16) but event was raised just for the second. I think that this event raised only once per "Send/Recieve All" action. Is this correct? |
#7
|
|||
|
|||
![]()
If I had a comma separated string with the EntryID's I would be very pleased.
But, I'm taking just one EntryID. The EntryID of the most recent email. Am I missing something? |
#8
|
|||
|
|||
![]()
I guess so, if more than 1 email comes in and you only get one EntryID.
I myself never use NewMailEx, I always use ItemAdd. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003 Reminder Manager, Extended Reminders, Attachment Options http://www.slovaktech.com/products.htm "tbo" wrote in message ... If I had a comma separated string with the EntryID's I would be very pleased. But, I'm taking just one EntryID. The EntryID of the most recent email. Am I missing something? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
ItemAdd | BlockNinja | Outlook and VBA | 1 | March 23rd 06 04:49 AM |