locked
to retrieve event if mail item is moved VSTO oulook RRS feed

  • Question

  • Hallo,

    i would like to know if it is posseble to to retrive a event if a mailitem is moved to a other folder.

    Gloat

    Tuesday, October 10, 2006 4:52 AM

Answers

  • Hello Gloat,

    as I know you can only register for the Folders.Items.Add event of the destination folder.
    You have to hack around this.

    Remember the ID of the mail and when you get the item add event of the folder, check the id of the newly added item.

    Hope this helps,

    greets, Helmut

    Tuesday, October 10, 2006 7:59 AM
    Answerer
  • Helmut is correct (and a great Outlook dev resource!)

    The only thing I would add is that using this event is good; just keep in mind that it will also fire if an item is copied into the folder. You will have to add additional code to detect whether this is an item being moved or if it is being copied.

    John

    Wednesday, October 11, 2006 3:57 PM

All replies

  • Hello Gloat,

    as I know you can only register for the Folders.Items.Add event of the destination folder.
    You have to hack around this.

    Remember the ID of the mail and when you get the item add event of the folder, check the id of the newly added item.

    Hope this helps,

    greets, Helmut

    Tuesday, October 10, 2006 7:59 AM
    Answerer
  • Helmut is correct (and a great Outlook dev resource!)

    The only thing I would add is that using this event is good; just keep in mind that it will also fire if an item is copied into the folder. You will have to add additional code to detect whether this is an item being moved or if it is being copied.

    John

    Wednesday, October 11, 2006 3:57 PM