![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
I have several mailboxes, including multiple shared mailboxes that each have
their own collection of folders(Inbox, Saved Items etc.) I've found lots of examples on how to select specific folders using VBA, but how do I select which mailbox I want so I can be sure I'm looking in the correct InBox? My requirement is to look for new incoming items in one shared mailbox, then move them to other folders within other shared mailboxes. I can't figure out how to select the relevant mailboxes? TIA |
#2
|
|||
|
|||
![]()
The NameSpace.Folders collection has all of your open mail stores. Of course
with PST files most or all will be called "Personal Folders" unless they are explicitly named something else. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "BAC" wrote in message ... I have several mailboxes, including multiple shared mailboxes that each have their own collection of folders(Inbox, Saved Items etc.) I've found lots of examples on how to select specific folders using VBA, but how do I select which mailbox I want so I can be sure I'm looking in the correct InBox? My requirement is to look for new incoming items in one shared mailbox, then move them to other folders within other shared mailboxes. I can't figure out how to select the relevant mailboxes? TIA |
#3
|
|||
|
|||
![]()
Thanks for the quick response, Ken, but my problem is that using the
NewMailEx event in a sub only seems to act on my Default Inbox (the mailbox -bruce.a.caouette). My routine is working when I send e-mails there I need to force the NewMailEX event to be triggered on new mail coming into another mailbox (mailbox-Bal AP Req) to automate a data collection process. Using the PickFolder method requires user intervention = Not really automated and SelectFolder doesn't allow me to specify the folder mailbox-Bal AP Req TIA "Ken Slovak - [MVP - Outlook]" wrote: The NameSpace.Folders collection has all of your open mail stores. Of course with PST files most or all will be called "Personal Folders" unless they are explicitly named something else. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "BAC" wrote in message ... I have several mailboxes, including multiple shared mailboxes that each have their own collection of folders(Inbox, Saved Items etc.) I've found lots of examples on how to select specific folders using VBA, but how do I select which mailbox I want so I can be sure I'm looking in the correct InBox? My requirement is to look for new incoming items in one shared mailbox, then move them to other folders within other shared mailboxes. I can't figure out how to select the relevant mailboxes? TIA |
#4
|
|||
|
|||
![]()
NewMail and NewMailEx both will only fire in the default mail store. Handle
the Inbox.Items.ItemAdd event for that other mailbox's Inbox folder. That may not work unless you add that other mailbox in your Outlook profile settings. It might not work if the folder is opened using the UI. So you should add that mailbox to your profile so it's opened when you open Outlook, get the Inbox using NameSpace.GetSharedDefaultFolder() and then add an ItemAdd handler for the Items collection of that folder. -- Ken Slovak [MVP - Outlook] http://www.slovaktech.com Author: Professional Programming Outlook 2007. Reminder Manager, Extended Reminders, Attachment Options. http://www.slovaktech.com/products.htm "BAC" wrote in message ... Thanks for the quick response, Ken, but my problem is that using the NewMailEx event in a sub only seems to act on my Default Inbox (the mailbox -bruce.a.caouette). My routine is working when I send e-mails there I need to force the NewMailEX event to be triggered on new mail coming into another mailbox (mailbox-Bal AP Req) to automate a data collection process. Using the PickFolder method requires user intervention = Not really automated and SelectFolder doesn't allow me to specify the folder mailbox-Bal AP Req TIA |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
select ALL option | Ranjit kurian | Outlook and VBA | 2 | September 22nd 08 06:24 PM |
Select Recipients | Ken Kast | Outlook and VBA | 3 | October 27th 07 05:51 PM |
Select item | j | Add-ins for Outlook | 4 | February 21st 07 07:49 PM |
How do i select Contacts from a shared mailbox in a new email? | contact me | Outlook - Using Contacts | 3 | May 22nd 06 08:50 PM |
Exchange Mailbox server prohibit from sending when reach mailbox size limit | Milly Staples [MVP - Outlook] | Outlook - General Queries | 1 | February 24th 06 06:41 PM |