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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top