Determine open item

M

Mark P

For all my contact items, I would like to have a single event handler for
the contact item open event. Unlike the application-level item send event,
the event handler does not take an item as an argument. Is there any way
that I can determine which contact item fired the open event?
 
K

Ken Slovak - [MVP - Outlook]

Handle NewInspector of the Inspectors collection. Only handle contacts if
that's all you're interested in. Set up a class module that handles events
for the contacts and instantiate a module level contact item so you have
access to all its properties. Add the class to a collection so it stays
alive and can handle its events and eventual Close, where you remove the
item from the collection.

That way each instance of the class handles only its own events.
 

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