Does mapi expose "Remove item from folder" event ?

  • Thread starter Thread starter tomer
  • Start date Start date
T

tomer

Hi,

I understand that there is no easy way to detect when an item is deleted
from a folder,
Is it possible to do it using MAPI?
does mapy expose events which outlook doesnot?


thanks in advance.
 
There's a ItemRemove event associated with the items
collection of every folder (folder.Items.ItemRemove)

Chris
 
But that event doesn't provide the Item that was deleted and also
fires after the item was already deleted. An ItemAdd event handler on
the Deleted Items folder's Items collection would trap all items not
hard deleted (Shift+Delete).
 
Yes, when you subscribe to the folder contents table events
(IMAPITable::Advise), you will get a TABLE_ROW_DELETED event which will pass
the value of the PR_INSTANCE_KEY property for that particular row. If you
have cached the other message properties (such as PR_ENTRYID) along with
PR_INSTANCE_KEY, you will be able to match which message had been deleted.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top