Addin to trap email item open

  • Thread starter Thread starter John
  • Start date Start date
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
 
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
 
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
-
 
Back
Top