A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Addin to trap email item open



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old July 2nd 09, 07:40 PM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba
John[_11_]
external usenet poster
 
Posts: 83
Default Addin to trap email item open

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


Ads
  #2  
Old July 3rd 09, 08:49 AM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba
Ashutosh Jogdande
external usenet poster
 
Posts: 10
Default Addin to trap email item open

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" wrote in message
...
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



  #3  
Old July 3rd 09, 08:54 AM posted to microsoft.public.dotnet.languages.vb,microsoft.public.outlook.program_addins,microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Addin to trap email item open

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
-
"John" wrote in message
...
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



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Outlook 2003 AddIn loads,but no Explorer or Item toolbars showing? [email protected] Add-ins for Outlook 1 February 11th 08 02:54 PM
unable to open recurring calendar events. "Can't open this item. Don Bosco Outlook - Calandaring 1 January 10th 08 01:45 AM
can't open outlook email. popup message. item not downloaded old boy Outlook - General Queries 1 September 30th 06 06:42 PM
Problem getting Incoming Item in my Outlook Addin seby Add-ins for Outlook 1 May 6th 06 07:44 PM
can't open this item unable to open the free/busy information Patamit Outlook - Calandaring 0 March 8th 06 05:31 PM


All times are GMT +1. The time now is 08:30 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.