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 VBA / December 2003

Tip: Looking for answers? Try searching our database.

2 Inboxes and Monitoring

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Paul Schrader - 16 Dec 2003 02:56 GMT
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

"Ken Slovak - [MVP - Outlook]" <kenslovak@mvps.org> wrote in message
news:uVRCcRAwDHA.560@TK2MSFTNGP11.phx.gbl...
> If you want to select an alternate Inbox to move messages to you can
> find it using code similar to the code snippet I supplied. You can get
> your default Inbox using NameSpace.GetDefaultFolder(olFolderInbox).
> Each of those folders has an EntryID. You can assign a global
> MAPIFolder object to the alternate Inbox folder when you find it or
> you can store the EntryID of the folder and get it when you want using
> NameSpace.GetItemFromID(strEntryID) where strEntryID is the EntryID
> you stored.
>
> Once you have the alternate folder and the default one you can move
> items to the alternate folder.
>
> --
> Ken Slovak
> [MVP - Outlook]
> http://www.slovaktech.com
> Author: Absolute Beginners Guide to Microsoft Office Outlook 2003
> Reminder Manager, Extended Reminders, Attachment Options
> http://www.slovaktech.com/products.htm
>
> "Paul Schrader" <misc@katanasword.com> wrote in message
> news:ebdtKf2vDHA.3196@TK2MSFTNGP11.phx.gbl...
> > Ken,
> >
> > I'm not getting this I tried  he results from your snippet of code
> and tried
> > to apply it but with no luck
> >
> > Can you show me what I need to change to make this work ? I run your
> code to
> > get the Id of the second mailbox and then qhat do I need to change
> in my
> > code to reference it ?
> >
> > Thanks
> > Paul
Dmitry Streblechenko - 16 Dec 2003 06:48 GMT
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

> Hello,
>
[quoted text clipped - 52 lines]
> > > Thanks
> > > Paul
Paul Schrader - 16 Dec 2003 12:48 GMT
Hello,

Could you please prove a code example ?

Thanks
Paul

> If you mean a second mailbox on Exchange, rertrieve it using
> Namespace.GetSharedDefaultFolder() and use MAPIFolder.Items.ItemAdd event.
[quoted text clipped - 62 lines]
> > > > Thanks
> > > > Paul
Dmitry Streblechenko - 16 Dec 2003 17:49 GMT
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

> Hello,
>
[quoted text clipped - 73 lines]
> > > > > Thanks
> > > > > Paul
 
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



©2009 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.