Thanks a lot Ken Slovak,
Now the sync problem has removed the instantiate and uninstantiation logic
of classes worked. But I didn't make the collecion.
Now the problem is all my classes related to conact/task/calendar/ are
instantiated in Application_start() of Addin.
Wo, whenever I receive Contact add event I made changes to it and call
ContactItem.Save(). by doing this the item_change event is raising
If I unregister the event using
items.ItemChange -= new Outlook.ItemsEvents_ItemChangeEventHandler(Func);
then this event perminently removed.
How could I overcome this problem, for the time being I used bool variables
tok handle this situation.
Also, Another problem is whenever birthday field set in contact item.
the new activity added in calendar I want to remove this activity or it
should not be added to calendar folder.
If I try to remove it inside Contact item add evet, then at that time this
activity not cteated.
Thanks a lot again your kind cooperation and on time answers.
"Ken Slovak - [MVP - Outlook]" wrote:
I'd probably create a global collection to gather all my event handling
classes and keep them alive and then remove those collection members as they
aren't needed or you need to de-reference them. Then I'd create a new class
instance to handle the events and add it to the collection.
Say on start synch you get rid of the class. Then on end of synch you
instantiate a new instance. That would work.
--
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
...
"Virda" wrote:
Thanks a lot Ken Slovak
I think you are right but problem is if I disable all these events then
How can I get the event from Outlook in that case
whenever user add/edit/delete any Contact/Task/Calendar item.
Currectly I registered these calsses at ThisApplication_Startup.
To get the any change related to Outlook Contact/Task/Calendar.
Should I make the instances of these classes global and then reinitialize
all these classes after sync process??