When Item_Add does not fire

G

g62msdnatll

I am seeing this behavior. I want to verify that it is by design and not a
bug in my program:

Scenario 1:
1) User starts and logs into Outlook
2) New_Mail events fire upon log in
3) Item_Add events do NOT fire in conjunction with these new mails being
added to Inbox
4) While Outlook is open, New_Mail events fire
5) Each new mail generates an Item_Add event on the Inbox

Scenario 2:
1) User starts Outlook
2) No new mail
3) After some time, new mail events fire
4) Item_Add fires for each new mail

BEHAVIOR: Item_Add does not consistently fire.

Is this correct?
 
S

Sue Mosher [MVP-Outlook]

Yes, that's correct and well documented in the MSKB: ItemAdd will not fire if a large number (>16) items arrive in the folder at one time.
 
G

g62msdnatll

I observe that the Item_Add event does not fire even when there are only a
couple of new messages. The only correlation is if the messages are loaded
into the Inbox upon starting Outlook, as opposed to during an already active
session.
 
S

Sue Mosher [MVP-Outlook]

In that case, perhaps no new messages have arrived in the Inbox. If you're looking at an Exchange mailbox, they're already there, not new, so no event fires.

--
Sue Mosher, Outlook MVP
Author of
Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top