If the user uses Exchange Server, Item_Add event NEVER occurs if there are rules...

My plug-in extract subject and body for all incoming messages. I created a
notification form. This form appears on the screen when new mail arrived.

I used Item_Add event for the Inbox folder

Problems:

1. If the user has rules (ex. a rule who move the new messages in other
folder) Item_Add event doesn't always occurs.

2. If the user uses Exchange Server, Item_Add event NEVER occurs if there
are rules...

I know there is an event in Outlook (new_mail). This event occurs when a new
message arrived, but this event doesn't return newMail item.

I want to retrieve all new MailItem objects when a new message arrived in
all conditions (Exchange, Rules) on Outlook2k (Corporate and Client Mail
Only) and OutlookXP.

Please I'm disparate, because on the Internet, I can't find any solutions

PS

If this is not possible, I want to create programmatically a rule. This rule
will copy all new messages in a folder RetrievedNewMails (this folder i will
create programmatically in DeletedItems folder). Means the event Item_Add
(for this folder) always fire. The problem is: Is possible to create
programmatically (in Visual Basic) rules?? If the user uses Outlook with
Exchange where I will create the rule programmatically? On the server? Is
possible?

Advertisements

Rules can interfere with ItemAdd, as you've seen. A server side rule
will run before the ItemAdd event on the Inbox, but client side rules
won't. They run partially before ItemAdd and partially after. So
there's plenty of room for conflict there too.

You can create a rule using code by using the Rule.DLL COM component.
You can download that from the MSDN Web site or from the Exchange 5.5
SDK. It also works in later versions of Exchange. There's some example
code for Rule.DLL at MSDN and also there's a downloadable program that
uses Rule.DLL and provides the DLL. Look athttp://www.cdolive.com/sampapps.htm and download the ruleasp.zip
example.

"Bogdan Tarla" <> wrote in message
news:...
> I developed a plug-in for Outlook 2k/XP in Visual Basic 6.0
>
> My plug-in extract subject and body for all incoming messages. I
created a
> notification form. This form appears on the screen when new mail
arrived.
>
> I used Item_Add event for the Inbox folder
>
> Problems:
>
> 1. If the user has rules (ex. a rule who move the new messages in
other
> folder) Item_Add event doesn't always occurs.
>
> 2. If the user uses Exchange Server, Item_Add event NEVER occurs if
there
> are rules...
>
>
>
> I know there is an event in Outlook (new_mail). This event occurs
when a new
> message arrived, but this event doesn't return newMail item.
>
>
>
> I want to retrieve all new MailItem objects when a new message
arrived in
> all conditions (Exchange, Rules) on Outlook2k (Corporate and Client
Mail
> Only) and OutlookXP.
>
> Please I'm disparate, because on the Internet, I can't find any
solutions
>
>
>
> PS
>
> If this is not possible, I want to create programmatically a rule.
This rule
> will copy all new messages in a folder RetrievedNewMails (this
folder i will
> create programmatically in DeletedItems folder). Means the event
Item_Add
> (for this folder) always fire. The problem is: Is possible to create
> programmatically (in Visual Basic) rules?? If the user uses Outlook
with
> Exchange where I will create the rule programmatically? On the
server? Is
> possible?
>
>
>
> Any help would be greatly appreciated.
>
> Thanks
> Bogdan Tarla
>
> Software engineer
>
>

Share This Page

Welcome to PC Review!

Hello and welcome to PC Review. We're a friendly computing community, bustling with knowledgeable members to help solve your tech questions.

Please join our friendly community by clicking the button below - it only takes a few seconds and is totally free. You'll be able to ask any tech support questions, or chat with the community and help others.
Sign up now!