Home All Groups Group Topic Archive Search About

Addin to trap email item open

Author
2 Jul 2009 5:40 PM
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

Author
3 Jul 2009 6:49 AM
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

Show quoteHide quote
"John" <info@nospam.infovis.co.uk> wrote in message
news:OU8cywz%23JHA.5040@TK2MSFTNGP04.phx.gbl...
> 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
>
Are all your drivers up to date? click for free checkup

Author
3 Jul 2009 6:54 AM
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
-
Show quoteHide quote
"John" <info@nospam.infovis.co.uk> wrote in message
news:OU8cywz%23JHA.5040@TK2MSFTNGP04.phx.gbl...
> 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
>

Bookmark and Share

Post Thread options