How can I disable the event handler for outlook.items collecton ob

L

lostwings

I have created a collection as follows

Private WithEvents myPublicContacts As Microsoft.Office.Interop.Outlook.Items

And raise the event 'ItemAdd' for the myPublicContacts object. However, in
some part of the code(when the items are populated from the Database), I
don't want to raise the ItemAdd event for myPublicContacts. So how can I
disable the event handler and then restore it back?

Thanks in advance!
 
Top