Delete Event

  • Thread starter Thread starter tim
  • Start date Start date
Let me expand a little.

I'm developing custom forms for Outlook 2000 and I am using VB Script.

The forms interact with data on an SQL server.

I need to run some SQL commands when an Outlook Item, such as a Contact or
Appointment gets deleted.

Is there a delete event that I can use? Like item_Close or item_Write...

why is there no delete event? like item_Delete.

Thanks for any help you can provide!
Tim
 
There is such an event (MailItem.BeforeDelete), the problem is it is only
available in Outlook 2002 and up.
You can also use MAPIFolder.Items.ItemRemove event; unfortunately it does
not pass the item being deleted as the parameter, so you will need to rescan
the whole folder to figure out what was deleted.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
BeforeDelete doesn't fire if the item is deleted from a folder view,
it only fires if the item is open and deleted from the File menu in
the open item, FWIW.
 
Back
Top