Delete Event

T

tim

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
 
D

Dmitry Streblechenko

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
 
K

Ken Slovak - [MVP - Outlook]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top