none
Get a list of changed and deleted outlook items RRS feed

  • Question

  • I got a question regarding Outlook, where I want to setup an outlook sync. The best way to go is everytime you want to sync to get a list of all new, changed and deleted outlook items since the previous succesfull synchronization.

    I know I can put events on items through the add-in, but sometimes the add-in ain't fully functional and I might lose data in this process. So I don't want to be independent on my own add-in for synchronization.

    So this means I want to search somekind of outlook log where I can see if items are new, changed or deleted since a specific date, where the most important event I want to see is the deleted, as this item is gone (if also deleted from the trash can). The new and changed items I can proces through the folder restrictions, but the deleted can not.

    Does any one know if Outlook has this kind of logging and is this accesible through the VSTO? Hope to hear from you soon.


    Tuesday, May 21, 2013 1:17 PM

Answers

  • What version of Outlook are you programming for? Always include that information.
     
    If it's a version that supports Folder.BeforeItemMove() you can trap deletions. If the target folder is Deleted Items the item was deleted, if it's null the item was hard deleted (Shift+Delete).
     
    If items are added/changed/deleted when your code isn't running, or operations are performed in bulk where you can miss events if too many items are added/changed/deleted at one time, there's no log for that or other pre-existing solution. You would have to monitor the contents of every folder of interest and maintain some sort of database of items and then check the contents against the database to see what if anything changed.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "ewolters" <=?utf-8?B?ZXdvbHRlcnM=?=> wrote in message news:cfb92689-2ac7-4523-bef6-80545ff87012...
    I'm currently not using Exchange, so I cannot use this option. Do you, or anyone, got some more ideas regarding this, or should I check to find another way for logging? Hope to hear from you soon.

    Ken Slovak MVP - Outlook
    • Marked as answer by ewolters Thursday, May 23, 2013 9:31 AM
    Wednesday, May 22, 2013 1:38 PM

All replies

  • If you are using Exchange, you can use ICS (incremental Change Synchronization) API either directly in C++ or Delphi (since it is Extended MAPI) or through Redemption (in any language) - see http://www.dimastr.com/redemption/rdofoldersynchronizer.htm

    This is the same API used by Outlook itself for synchronization.


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

    Tuesday, May 21, 2013 6:15 PM
  • I'm currently not using Exchange, so I cannot use this option. Do you, or anyone, got some more ideas regarding this, or should I check to find another way for logging? Hope to hear from you soon.
    Wednesday, May 22, 2013 7:23 AM
  • What version of Outlook are you programming for? Always include that information.
     
    If it's a version that supports Folder.BeforeItemMove() you can trap deletions. If the target folder is Deleted Items the item was deleted, if it's null the item was hard deleted (Shift+Delete).
     
    If items are added/changed/deleted when your code isn't running, or operations are performed in bulk where you can miss events if too many items are added/changed/deleted at one time, there's no log for that or other pre-existing solution. You would have to monitor the contents of every folder of interest and maintain some sort of database of items and then check the contents against the database to see what if anything changed.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "ewolters" <=?utf-8?B?ZXdvbHRlcnM=?=> wrote in message news:cfb92689-2ac7-4523-bef6-80545ff87012...
    I'm currently not using Exchange, so I cannot use this option. Do you, or anyone, got some more ideas regarding this, or should I check to find another way for logging? Hope to hear from you soon.

    Ken Slovak MVP - Outlook
    • Marked as answer by ewolters Thursday, May 23, 2013 9:31 AM
    Wednesday, May 22, 2013 1:38 PM
  • Thanks for the reply!

    I thought so what you were saying, but now I'm sure. Ans also thanks for the Folder.BeforeItemMove() option, I will take a look at this.

    Thursday, May 23, 2013 9:31 AM