ProcessItemChange firing twice

Add-in Express™ Support Service
That's what is more important than anything else

ProcessItemChange firing twice
In VB.NET the ProcessItemChange event is firing twice. 
Charles Tournear




Posts: 4
Joined: 2007-03-12
In VB.NET the ProcessItemChange event is firing twice.
I am using Add-in-express developer 2.4 with office 2003.
When I add or change a contact the add event and the change event fire, then when I move to another folder the change event fires again repeating the information about the first change I made.
Is there any way to prevent this second event firing.

charles.tournear
ResultData
Posted 12 Mar, 2007 09:07:18 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Hi Charles.

To prevent this situation you could determine if the item is moved to another folder. To obtain the currect folder of the item you can use the Parent property of the Outlook._ContactItem interface.



P.S. Note that we take up your forum requests in the order we receive them.
Besides, it may take us some time to investigate your issue. Please be sure we will let you know as soon as the best possible solution is found.
Posted 12 Mar, 2007 18:12:42 Top
Charles Tournear




Posts: 4
Joined: 2007-03-12
Sergey,
Thanks for the response.
Sorry for the mis-understanding.
I'm not trying to move a contact to another folder.
I'm just modifying an existing contact.
Adding another contact, and/or modifying other contacts, Which fire the change and add events appropriately.
When I click on another folder, such as calendar or inbox, the change event is firing with a reference to the first item I performed an action on in the contact folder. I'm trying to prompt the user about syncing with a database and I don't what this to run twice.
Posted 13 Mar, 2007 09:47:13 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Charles,
do you modify the contact item in the ProcessItemChange event handler?
Posted 13 Mar, 2007 11:56:16 Top
Charles Tournear




Posts: 4
Joined: 2007-03-12
Sergey,
At the momemt all the Add and Change events do is display a messagebox, just to verify that they fired.
Posted 14 Mar, 2007 08:45:57 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Charles, I have just tested this situation in the OutlookFolderItemsEvents example from the Add-in Express installation package. The message box appears once. Could you please test the example on your PC?
Posted 14 Mar, 2007 18:00:13 Top
Charles Tournear




Posts: 4
Joined: 2007-03-12
Sergey,
I ran the Outlook Folder Items Events Demo
Changed type to contacts and clicked reconnect
Edited a record - change prompt appeared
Deleted a record - delete prompt appeared
Created a new contact - add prompt appeared.
Clicked on Mail in Outlook and after about 30 sec a change prompt appeared.
Posted 16 Mar, 2007 10:58:52 Top
Sergey Grischenko


Add-in Express team


Posts: 7233
Joined: 2004-07-05
Charles,
I have developed a component that intercept events of MAPI store.
I can send you the installer with examples if you wish. I think it will help you to solve the issue.
Posted 16 Mar, 2007 12:21:53 Top