Thread: Deleted Items
View Single Post
  #4  
Old March 7th 06, 02:36 AM posted to microsoft.public.outlook.program_addins
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Deleted Items

How does GetPropertyHelper work? And how -- and when -- is Item instantiated?

--
Sue Mosher, Outlook MVP
Author of Configuring Microsoft Outlook 2003
http://www.turtleflock.com/olconfig/index.htm
and Microsoft Outlook Programming - Jumpstart for
Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx


"Rog" wrote in message ...
Thanks as always Sue:

Outlook.MAPIFolder mFolder
=(Outlook.MAPIFolder)HelperClass.GetPropertyHelper (item, "Parent");
string fname = mFolder.Name;

if(fname.IndexOf("Deleted") = 0)
{

}

"fname" seems to be the original folder that the item was deleted from,
not the deleted items folder. If I close outlook and restart then it
picks up.
I am running this code on a button click not on any outlook event.


Hey guys, I want to check if an item exists in the DeletedItems Folder,
but if I use item.Parent, it will show me the original folder of the
item. So if I delete a task through outlook UI, and then in my code
check the Parent it will still show as Tasks until I shutdown outlook
and restart. It is like it does not pick up the fact that this item is
in the Deleted Items folder until I restart outlook. I do not want to
enumerate through all of the deleted items each time, so do you have any
suggestions?
Thanks

Ads