Addin to trap email item open

Status
Not open for further replies.
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

"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
>
 
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)

-

"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
>
 
Status
Not open for further replies.
Similar threads
Thread starter Title Forum Replies Date
J Addin to trap email item open Outlook VBA and Custom Forms 2
Gary Hile Icloud addin for outlook 2016 Using Outlook 5
P outlook addin unloaded in office 2007 Using Outlook 0
P Oulook addin unloaded in office 2007 Outlook VBA and Custom Forms 2
oliv- How to Run a Script IN AN ADDIN with Outlook's Rules and Alerts Outlook VBA and Custom Forms 2
Diane Poremsky Always Load an Outlook Addin Using Outlook 1
S BCM crash Atheros Addin 2010 Using Outlook 1
D Constant Dropbox Outlook Addin Authentication Prompts Using Outlook 5
T client addin deletes all business contacts BCM (Business Contact Manager) 1
C Outlook 2010, Need to restrict domain users from installing any sort of a addin in outlook Using Outlook 2
M Icloud Addin in Outlook 2013 Exchange Server Administration 9
R Addins4Outlook TagIt! addin script or VBA module? Using Outlook 2
P Addin / macro / rule to highlight email addresses outside company in To: field Using Outlook 3
H Outlook 2010 Antispam Addin Not Available Using Outlook 1
S COM Addin Failed to load in Outlook 2003 Outlook VBA and Custom Forms 1
G Addin to define message format on a per-contact basis? Outlook VBA and Custom Forms 1
C Connecting to an addin in Outlook 2010 (or not) Outlook VBA and Custom Forms 1
V how to collect details from user, during installation of office addin? Outlook VBA and Custom Forms 1
A how to enable macro for addin Outlook VBA and Custom Forms 3
T Regarding Outlook addin Outlook VBA and Custom Forms 1
N Drag and drop attachment in outlook addin Outlook VBA and Custom Forms 4
S Outlook addin formregion as a drop down Outlook VBA and Custom Forms 6
K Attach addin to outlook 2007 editor Outlook VBA and Custom Forms 3
W My VSTO 3.0 Outlook addin doesn’t load Outlook VBA and Custom Forms 1
T need help w/ sending an e-mail -- outlook 2007 addin Outlook VBA and Custom Forms 2
M VSTO 2007 Addin auto-disabled on one machine but not another on installation? Outlook VBA and Custom Forms 1
N VSTO outlook 2007 addin installation problem Outlook VBA and Custom Forms 1
N Support for outlook 2003 addin in xp home sp2 Outlook VBA and Custom Forms 3
R Hi, Ken, What should be noticed to avoid memory leak in outlook addin? Outlook VBA and Custom Forms 3
D Outlook AddIn can't load outside Visual Studio Outlook VBA and Custom Forms 1
T Shared addin using .net - deployment for non admins Outlook VBA and Custom Forms 3
T Simple MAPI send and Outlook COM addin Outlook VBA and Custom Forms 3
M VSTO Outlook2007 Addin. After switching from 3.5 to 2.0 Framework i get "'MSB3185: EntryPoint not sp Outlook VBA and Custom Forms 1
U Outlook Addin Creation using Visual Studio 2008 Outlook VBA and Custom Forms 1
E Opening WinForm in Outlook 2003 VSTO Addin with Wordmail enabled Outlook VBA and Custom Forms 1
J Emails stay in Outbox forever once addin is loaded Outlook VBA and Custom Forms 3
C Problem installing VSTO AddIn on Vista Outlook VBA and Custom Forms 3
B ADDIN vs Cuastomize Outlook VBA and Custom Forms 1
D Outlook 2007 AddIn: Rendering issue Outlook VBA and Custom Forms 1
D Outlook 2007 AddIn: Filter attachments by type Outlook VBA and Custom Forms 2
Q How tough is it to convert VBA to Addin Outlook VBA and Custom Forms 1
M Trap email send event Outlook VBA and Custom Forms 7
A trap outbound mail to update subject Outlook VBA and Custom Forms 6
V Can one change the formatting of email title blocks? Using Outlook 0
P default font when sending email from browser Using Outlook 1
D VBA Macro to Print and Save email to network location Outlook VBA and Custom Forms 1
B IMAP server rejects sent email - cannot deliver messages Using Outlook 2
TedSch Small vba to kill political email Outlook VBA and Custom Forms 3
X Open Hyperlinks in an Outlook Email Message (Help with Diane's solution) Outlook VBA and Custom Forms 3
e_a_g_l_e_p_i Email notifications changed with Outlook 2021 Using Outlook 8

Similar threads

Top