how to track which item is removed?

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

In one of the outlook.items collection object's Event handler ItemRemove(),
it does not return back the item to be removed. Is there a way to track the
information of the item to be removed from a certain folder? Thanks in
Advance!
 
Am Wed, 30 Nov 2005 13:12:02 -0800 schrieb lostwings:

The only way I know of: Create a collection of EntryIDs for the folder´s
Items (and update it in ItemAdd). If you receive the ItemRemove then loop
through your collection and compare with all folder items: The missing items
are the removed ones.
 
thanks a lot. Yesterday I just found another way to track the item to be
deleted. For each item to be deleted, it will automatically be added to the
Deleted Items Folder. So I just need to monitor the ittAdd event for that
folder's items collection object to track the item information.
 
Items deleted using Shift+Delete won't be added to Deleted Items. Michael's
suggestion is the only way to account for all possibilities.

Also, if the item being removed is the last item in that folder's Items
collection ItemRemove won't fire usually. Then you also have to track
ItemChange, which will fire under those conditions. You'd check for
Items.Count in that event handler.
 
Back
Top