outlook 2003 - new mail event different then in 2000/2002

C

Chris Peel

Hi,

I was wondering if anyone has delt with this general issue:

We have working Com Add-in (C++) that works across Outlook 2000, 2002 and 2003. When an 'new email' is recieved the event triggers the code and we 'replace the classId' so our own icon and form is used.

Now this works in 2002 & 2000. However in 2003 the event "new mail" seems to be delayed 20 seconds or so. The code path executes as 2003 notifies me of new mail - not when it arrived. What's changed? What can I do to get the same behavior I have in 2000/2 - change the class id upon receipt.

Any direction and thought are greatly appreciated. I'm the PM on the project (with some VBA and VBA Addin experience). I'm just trying to help my guys out and see if this issue has been resolved by someone already.

Thanks.

Chris Peel
(e-mail address removed)
 
K

Ken Slovak - [MVP - Outlook]

Cached mode? That could do it and there are other differences in how cached
mode operates compared to how things used to work in offline mode against
the OST file.

There isn't a lot you can do to change cached mode behavior, for example
with handling an ItemChange or ItemAdd event for an Items collection when in
cached mode you might see delays of up to 45 seconds or so between the time
the item is changed and when the event fires. About all you can do is test
for cached mode if the Outlook version is 11.

BTW, NewMail is not the best event to handle. It only fires at intervals and
doesn't give you a handle to the newly arrived mail. You'd be far better off
handling the ItemAdd event on the Items collection of the Inbox.




Hi,

I was wondering if anyone has delt with this general issue:

We have working Com Add-in (C++) that works across Outlook 2000, 2002 and
2003. When an 'new email' is recieved the event triggers the code and we
'replace the classId' so our own icon and form is used.

Now this works in 2002 & 2000. However in 2003 the event "new mail" seems
to be delayed 20 seconds or so. The code path executes as 2003 notifies me
of new mail - not when it arrived. What's changed? What can I do to get the
same behavior I have in 2000/2 - change the class id upon receipt.

Any direction and thought are greatly appreciated. I'm the PM on the
project (with some VBA and VBA Addin experience). I'm just trying to help
my guys out and see if this issue has been resolved by someone already.

Thanks.

Chris Peel
(e-mail address removed)
 
C

Chris Peel

Thanks - I figured the Cache issue out only tonight.

I'll take the time and get the guys to look at the addItem event

Chris
 
K

Ken Slovak - [MVP - Outlook]

The primary thing to remember with ItemAdd (or any event handler) is to make
your time in the event handler as short as possible so other instances of
that event will fire. The event handlers aren't reentrant (the same
principle as with interrupt service routines for hardware) so you want to
exit the handler as quickly as possible.
 

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