none
Listen to events or even deeper? RRS feed

  • Question

  • Hello everyone,

    is there a way to run code when someone is moving a mail into another folder? Example:

    We have the default inbox folder. Now the user is moving a mail from the inbox folder into a folder called "test" via drap and drop.
    Now when the user is taking the finger from the mouse and outlook moves the mail I want to run some custom code in that moment.

    Is that possible?

    Thanks!

    Regards
    Christian

    Tuesday, March 13, 2012 1:08 AM

Answers

  • If you know the source and target folders, you can use RDOItems events (ItemAdd/ItemChange/ItemDelete events).

    Otherwise Extended MAPI (or Redemption which wraps Extended MAPI) are you only choices.

    On the MAPI level (C++ or Delphi only), you will need to subscribe (IMsgStore::Advise) to the fnevObjectCopied and fnevObjectMoved notifications. You can see the events in OutlookSpy if you click the IMsgStore button and go to the IMsgStore::Advise tab.

    In Redemption, you can use the RDOStoreEvents (OnMessageMoved, OnMessageMovedEx, OnMessageMoved3 events):  http://www.dimastr.com/redemption/rdostore.htm


    Dmitry Streblechenko (MVP)
    http://www.dimastr.com/redemption
    Redemption - what the Outlook
    Object Model should have been
    Version 5.2 is now available!

    Tuesday, March 13, 2012 3:56 AM