View Single Post
  #3  
Old September 21st 06, 12:11 PM posted to microsoft.public.outlook.program_vba
Virda
external usenet poster
 
Posts: 13
Default ContactItem.Save()

Hello Ken,

Thanks for your reply!

I tried your recomended solution but it didn't work.

Acutually during Sync/receiving all items from server I have to add into the
Outlook 2003 along with a userproperty where we save its ID.

After it I ahve to call ContactItem.Save().

As soon as this save() functin executed the ItemsEvents_ItemAddEventHandler
evevt raises and inside this event handler we are sending this perticular
item to server. Due to this cycle same data resend to server, that is wrong.

IS there a way Icould disable this event or remove this event???

"Ken Slovak - [MVP - Outlook]" wrote:

Look at the LastModificationTime property on the item. Use some sort of time
comparison so that unless a change hasn't occurred in x seconds or minutes
you don't synch the item. Something like that is about all you can do.

--
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


"Virda" wrote in message
...
problem is whatever change is made in Contact folder's Contact Item I
capture the event 'ItemChange' and process that contactItem.

In Contact Item Add event there is a need of my program to send data to
server of perticular Contact Item after update the data I want to save it
by
using ContactItem.Save().

But, as soon as ContactItem.Save() function executed it raises the event
ContactItemChanged.

Due to this behaviour multiple times same data send to server.

Is there any way I could prevent this behaviour?

I am looking forward your answer.



Ads