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

Discussion in 'Microsoft Outlook Third-Party Utilities' started by Bogdan Tarla, Sep 2, 2003.

  1. Bogdan Tarla

    Bogdan Tarla Guest

    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
     
    Bogdan Tarla, Sep 2, 2003
    #1
    1. Advertisements

  2. 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 at
    http://www.cdolive.com/sampapps.htm and download the ruleasp.zip
    example.

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Lead Author, Professional Outlook 2000 Programming, Wrox Press
    Lead Author, Beginning VB 6 Application Development, Wrox Press
    Attachment Options
    http://www.slovaktech.com/attachmentoptions.htm
    Extended Reminders
    http://www.slovaktech.com/extendedreminders.htm


    "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
    >
    >
     
    Ken Slovak - [MVP - Outlook], Sep 4, 2003
    #2
    1. Advertisements

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Tobin
    Replies:
    1
    Views:
    743
    Sue Mosher [MVP]
    Jul 7, 2003
  2. Guest

    Microsoft Outlook 2003 local rules with Exchange???

    Guest, Nov 3, 2003, in forum: Microsoft Outlook Third-Party Utilities
    Replies:
    17
    Views:
    6,789
    Ken Slovak - [MVP - Outlook]
    Nov 7, 2003
  3. Guest

    Calendar exchange notes/domino vs outlook/exchange

    Guest, Nov 18, 2003, in forum: Microsoft Outlook Third-Party Utilities
    Replies:
    0
    Views:
    719
    Guest
    Nov 18, 2003
  4. Guest

    Palm TX synch's but my inbox and calender never show up

    Guest, Oct 24, 2006, in forum: Microsoft Outlook Third-Party Utilities
    Replies:
    0
    Views:
    411
    Guest
    Oct 24, 2006
  5. rrascal3

    Is there a mind map utility for analyzing Outlook rules?

    rrascal3, May 21, 2008, in forum: Microsoft Outlook Third-Party Utilities
    Replies:
    0
    Views:
    617
    rrascal3
    May 21, 2008
Loading...

Share This Page