View Single Post
  #1  
Old May 15th 08, 07:57 PM posted to microsoft.public.outlook.program_forms
Jon Rizzo
external usenet poster
 
Posts: 12
Default determining which item(s) are being deleted


I would like to execute some code when certain items are deleted. Is there
any way to detect which items are being deleted in the Items.ItemRemove
event, and then query their properties before they are deleted? I tried
checking Explorer.Selection, but:

#1, I'm not confident that the current selection will ALWAYS contain the
items being deleted
#2, if I check the selected item's message class and then cast the object
onto the appropriate type (for example, ContactItem for "IPM.Contact") I get
an InvalidCast.

Is there a way to (reliably) do what I'm trying to do?

Jon


Ads
 

Car Insurance - Mortgage Calculator - Car Insurance - Credit Cards - Hotels