Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Contacts / November 2004

Tip: Looking for answers? Try searching our database.

ItemRemove

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
James - 24 Nov 2004 03:02 GMT
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
Ken Slovak - [MVP - Outlook] - 24 Nov 2004 15:04 GMT
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.

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

> Hi,
> I have an Outlook Add-in (vb.net fx 1.1, Outlook 2002 SP3, Exchange 2000),
[quoted text clipped - 30 lines]
> Thanks in advanced and sorry for my bad english.
> James
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.