Addin to trap email item open

J

John

Hi

I am trying to write an add-in in vs2008 for OL2003. Is there a way to trap
the item open event i.e. when a mail item is opened by user? This is to give
user choice of either opening the mail item as normal or allow the add-in to
do something else to the email?

Thanks

Regards
 
A

Ashutosh Jogdande

Hi John,

You can achieve this by handling Application.ItemLoad event,
in this you can look for MailItem as an Objet type, if it is then handle
MailItem's Open event.

Thanks,
Ashutosh
 
D

Dmitry Streblechenko

Look at the Application.Inspectors.NewInspector event. It will not let you
cancel the action.
You can also trap the MailItem.Open event (which is canceable), but that
means that you will need to set an an event handler on each selected
messages and track the selection by using the Explorer.SelectionChange
event.

--
Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
-
 

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