NewMail event and Rules

  • Thread starter Thread starter R Avery
  • Start date Start date
R

R Avery

I have tested out which fires first, a rule or the NewMail event in OL
2002. The rule applies first. This makes it very difficult to figure
out which email was just received.

Normally, I'd get the default inbox folder and take the first item, but
if it has already moved to somewhere else because of a rule, then there
is nothing I can do (except find which email has the most recent
received date, but that would take prohibitively long).

Is there anyway around this? Is there anyway to get a reference to the
just-received email after a rule has been applied to it?
 
Your best bet for processing an incoming e-mail is to work with the ItemAdd
event, although this won't fire if a large number of messages are
added/delivered at the same time. Otherwise, you can write an Exchange Event
Sink to intercept the messages before they are even delivered to your Inbox.

These articles have some great info:

OL2002: ItemAdd Event Doesn't Run in Some Scenarios:
http://support.microsoft.com/default.aspx?scid=kb;en-us;290653

How to create a custom rule using Visual Basic for Applications (VBA) in
Outlook 2002:
http://support.microsoft.com/default.aspx?scid=kb;en-us;292063

Exchange Store Event Sinks:
http://msdn.microsoft.com/library/en-us/e2k3/e2k3/_techsel_tech_7.asp?frame=true
 
Very sexy. Thanks, eric!

Your best bet for processing an incoming e-mail is to work with the ItemAdd
event, although this won't fire if a large number of messages are
added/delivered at the same time. Otherwise, you can write an Exchange Event
Sink to intercept the messages before they are even delivered to your Inbox.

These articles have some great info:

OL2002: ItemAdd Event Doesn't Run in Some Scenarios:
http://support.microsoft.com/default.aspx?scid=kb;en-us;290653

How to create a custom rule using Visual Basic for Applications (VBA) in
Outlook 2002:
http://support.microsoft.com/default.aspx?scid=kb;en-us;292063

Exchange Store Event Sinks:
http://msdn.microsoft.com/library/en-us/e2k3/e2k3/_techsel_tech_7.asp?frame=true

--
Eric Legault - B.A, MCP, MCSD, Outlook MVP
--------------------------------------------------
{Private e-mails ignored}
Job: http://www.imaginets.com
Blog: http://blogs.officezealot.com/legault/


:
 
Back
Top