2 Inboxes and Monitoring

  • Thread starter Thread starter Paul Schrader
  • Start date Start date
P

Paul Schrader

Hello,

Anyone else have any ideas ?

Thanks
Paul




Ken,

I want to monitor the Inbox of the Second Account. So that when New items
come in I can review them Programmatically to determine if they meet certain
criteria and deal with the Messages. I have the code that works fine when
only one inbox is open, but I need to be able to monitor a second inbox as
several of my users have 2 Inbox and what to run this code while having both
open.

Can you please review the code I've posted in this thread to determine if
their is a way to accomplish this ?

Thanks
Paul
 
If you mean a second mailbox on Exchange, rertrieve it using
Namespace.GetSharedDefaultFolder() and use MAPIFolder.Items.ItemAdd event.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Dim SecondInbox as Outlook.MAPIFolder
Dim with events SecondInboxItems as Outlook.Items
....
set Recip = Application.CreateRecipient("name of the second mailbox")
set SecondInbox = Application.Session.GetSharedDefaultFolder(Recip,
olFolderInbox)
set SecondInboxItems = SecondInbox.Items
....
sub SecondInboxItems_ItemAdd(Item)
MsgBox Item.Subject
end sub

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool
 
Back
Top