ItemRemove

J

James

Hi,
I have an Outlook Add-in (vb.net fx 1.1, Outlook 2002 SP3, Exchange 2000),
it use an public folder to store Contacts Items with a custom form and
custom Properties, each contact in the public folder has a row in a SQL
Database table.
I need to know when a contact is deleted from the Public folder to delete
the Contact in the SQL.
I use the ItemRemove Event of the Contact Folder in the Add-in.
(Public Shared Sub Contacts_OnItemRemove() Handles Contacts.ItemRemove)

Every time that a Contact is deleted, the Event is fired and I use the

Outlook ActiveExplorer.Selection to obtain the Contact that was deleted and
a Custom Property of the Contact.

Everything seems to be ok to One User. but, when Many users are using the
Public Folder, event ItemRemove is fired in the user that has deleted the
Contact AND is fired in another user also (Yes, I have verified in a test
enviroment that really happens). That is causing problems because the
second user has seleted another contact and makes my application to delete
(in the SQL) the correct contact to be deleted and another contact (that
wasn't deleted!)

Each user has his own View (Private View)

I have read that there is no way to handle the Delete Event in the Outlook
Form using vb script.

What is the best solution to this case? I'm trying to use Exchage Store
Events, Anyone has a sample to detect the deleted contact and get a custom
Property of this item?

Thanks in advanced and sorry for my bad english.
James
 
K

Ken Slovak - [MVP - Outlook]

If everyone is using the same Outlook code then ItemRemove would fire for
all users who are running the code. No way around that. A synchronous event
sink running on the public folder would be the way to go.

The best place to ask about event sinks is in one of the Exchange
development newsgroups, for example
microsoft.public.exchange2000.development.
 

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