Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Outlook / Programming Add-Ins / August 2006

Tip: Looking for answers? Try searching our database.

Intercepting ItemEvents

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
darshan tilak - 19 Aug 2006 12:44 GMT
I got a simple com addin for otulook working.
I need help me regarding how to intercept the ItemEvents : Add or
BeforeDelete.
I am aware of how to catch ApplicationEvents, but nowhere have i found an
example for ItemEvents.

A code example would be great....
Ken Slovak - [MVP - Outlook] - 21 Aug 2006 14:42 GMT
BeforeDelete only fires if the item is opened and you delete the item from
its File menu. Otherwise you won't ever get that event.

ItemAdd is an event of the Items collection of a MAPIFolder object. Since
you don't mention your language platform here's a sample in VBA.

Dim WithEvents colItems As Outlook.Items

' set colItems to the Items collection of the folder of interest. Then you
can handle the add event:

Private Sub colItems_ItemAdd(ByVal Item As Object)

Signature

Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Absolute Beginner's Guide to Microsoft Office Outlook 2003
Reminder Manager, Extended Reminders, Attachment Options
http://www.slovaktech.com/products.htm

>I got a simple com addin for otulook working.
> I need help me regarding how to intercept the ItemEvents : Add or
[quoted text clipped - 3 lines]
>
> A code example would be great....
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.