Outlook Banter

Outlook Banter (http://www.outlookbanter.com/)
-   Outlook and VBA (http://www.outlookbanter.com/outlook-vba/)
-   -   detecting new mail in shared mailbox (http://www.outlookbanter.com/outlook-vba/70761-detecting-new-mail-shared-mailbox.html)

Mark VII April 22nd 08 08:47 PM

detecting new mail in shared mailbox
 
Greetings --

I'm doing some work on automated processing of incoming email. Am able to
detect and process email coming into my personal inbox by hooking the
Application_NewMailEx event. However when email arrives in a shared mailbox,
this event doesn't fire.

What's the best way to detect new mail in a shared mailbox? I'm trying to
stay away from rules, because of the way that VbaProject_OTM disappears
sometimes if you use rules.

Thanks,
Mark

Sue Mosher [MVP-Outlook] April 22nd 08 09:00 PM

detecting new mail in shared mailbox
 
Subscribe to the MAPIFolder.Items.ItemAdd event on the mailbox's Inbox folder, which you can return with the Namespace.GetSharedDefaultFolder method.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Mark VII" wrote in message ...
Greetings --

I'm doing some work on automated processing of incoming email. Am able to
detect and process email coming into my personal inbox by hooking the
Application_NewMailEx event. However when email arrives in a shared mailbox,
this event doesn't fire.

What's the best way to detect new mail in a shared mailbox? I'm trying to
stay away from rules, because of the way that VbaProject_OTM disappears
sometimes if you use rules.

Thanks,
Mark


Mark VII April 22nd 08 09:08 PM

detecting new mail in shared mailbox
 
Thanks -- I'll give that a try.

Mark

"Sue Mosher [MVP-Outlook]" wrote:

Subscribe to the MAPIFolder.Items.ItemAdd event on the mailbox's Inbox folder, which you can return with the Namespace.GetSharedDefaultFolder method.




All times are GMT +1. The time now is 03:37 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-2006 OutlookBanter.com