none
How to Access the Contacts from Deleted Items folder using visual studio 2010 RRS feed

  • Question

  • Hi,

      I am trying to access the list of contact items i have deleted from outlook. Actually my requirement is, I have to remove the items from other system 

    if it is deleted from outlook. And i find the best way to do it that if i can find the deleted contacts then it will be easy to handle this case. I want to carry very less data in case of deletion so o can avoid out of memory exception.

    Thanks in Advance.

    Santosh Kumar Mishra

    Wednesday, July 25, 2012 11:08 AM

Answers

  • The Deleted Items folder has an Items collection that contains every item that was soft deleted. If the user clears the Deleted Items folder, or deletes items from it, or hard deletes the items (Shift+Delete) you won't be able to find those items as they won't exist any longer.
     
    You don't mention which language you want to use, or where the code will run, but using Outlook automation once you have an Outlook.Application reference you can use NameSpace.GetDefaultFolder(olFolderDeletedItems).Items to access the items in the folder. You can then test each to see if it's a contact item.
     
    To find contacts in one system that aren't in another you'd need to check each one on system B to see if it exists in System A. How you'd do that would depend on whether or not Exchange server is used and what version of Outlook you're using.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Santosh Mishra" <=?utf-8?B?U2FudG9zaCBNaXNocmE=?=> wrote in message news:13ef7520-a941-47b1-9135-8385519efc9e...

    Hi,

      I am trying to access the list of contact items i have deleted from outlook. Actually my requirement is, I have to remove the items from other system 

    if it is deleted from outlook. And i find the best way to do it that if i can find the deleted contacts then it will be easy to handle this case. I want to carry very less data in case of deletion so o can avoid out of memory exception.

    Thanks in Advance.

    Santosh Kumar Mishra


    Ken Slovak MVP - Outlook
    Wednesday, July 25, 2012 1:17 PM
  • Other than whatever items are in Deleted Items there's nothing at the Outlook object model level that would help with what you want.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Santosh Mishra" <=?utf-8?B?U2FudG9zaCBNaXNocmE=?=> wrote in message news:0c8e9825-9571-4643-86e5-acd922e64736...

    hi Ken

    I am using Visual studio 2010 and the language will be vb .net.

    I know that once i delete the items from deleted items folder it will be no longer available.

    But i want to know, whether is there any fields outlook provides to get the deleted data information.

    Actually i want to get the list of deleted items after a specified date.

    thanks ken


    Ken Slovak MVP - Outlook
    Wednesday, July 25, 2012 2:17 PM

All replies

  • The Deleted Items folder has an Items collection that contains every item that was soft deleted. If the user clears the Deleted Items folder, or deletes items from it, or hard deletes the items (Shift+Delete) you won't be able to find those items as they won't exist any longer.
     
    You don't mention which language you want to use, or where the code will run, but using Outlook automation once you have an Outlook.Application reference you can use NameSpace.GetDefaultFolder(olFolderDeletedItems).Items to access the items in the folder. You can then test each to see if it's a contact item.
     
    To find contacts in one system that aren't in another you'd need to check each one on system B to see if it exists in System A. How you'd do that would depend on whether or not Exchange server is used and what version of Outlook you're using.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Santosh Mishra" <=?utf-8?B?U2FudG9zaCBNaXNocmE=?=> wrote in message news:13ef7520-a941-47b1-9135-8385519efc9e...

    Hi,

      I am trying to access the list of contact items i have deleted from outlook. Actually my requirement is, I have to remove the items from other system 

    if it is deleted from outlook. And i find the best way to do it that if i can find the deleted contacts then it will be easy to handle this case. I want to carry very less data in case of deletion so o can avoid out of memory exception.

    Thanks in Advance.

    Santosh Kumar Mishra


    Ken Slovak MVP - Outlook
    Wednesday, July 25, 2012 1:17 PM
  • hi Ken

    I am using Visual studio 2010 and the language will be vb .net.

    I know that once i delete the items from deleted items folder it will be no longer available.

    But i want to know, whether is there any fields outlook provides to get the deleted data information.

    Actually i want to get the list of deleted items after a specified date.

    thanks ken

    Wednesday, July 25, 2012 1:50 PM
  • Other than whatever items are in Deleted Items there's nothing at the Outlook object model level that would help with what you want.

    --
    Ken Slovak
    [MVP-Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    "Santosh Mishra" <=?utf-8?B?U2FudG9zaCBNaXNocmE=?=> wrote in message news:0c8e9825-9571-4643-86e5-acd922e64736...

    hi Ken

    I am using Visual studio 2010 and the language will be vb .net.

    I know that once i delete the items from deleted items folder it will be no longer available.

    But i want to know, whether is there any fields outlook provides to get the deleted data information.

    Actually i want to get the list of deleted items after a specified date.

    thanks ken


    Ken Slovak MVP - Outlook
    Wednesday, July 25, 2012 2:17 PM