Group:  Microsoft Outlook ยป microsoft.public.outlook.program_addins
Thread: Intercepting ItemEvents

Geek News

Intercepting ItemEvents
"darshan tilak"<some[ at ]gmail.com> 8/19/2006 11:44:23 AM
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....
Re: Intercepting ItemEvents
"Ken Slovak - [MVP - Outlook]" <kenslovak[ at ]mvps.org> 8/21/2006 1:42:23 PM
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)


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


"darshan tilak" <some[ at ]gmail.com> wrote in message
news:71ca8c38778146629809f35d8aeccb2b[ at ]ureader.com...
[Quoted Text]
>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....

Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net