A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Select Mailbox



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old January 27th 09, 08:57 PM posted to microsoft.public.outlook.program_vba
bac
external usenet poster
 
Posts: 4
Default Select Mailbox

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  
Old January 27th 09, 09:47 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Select Mailbox

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  
Old January 28th 09, 07:58 PM posted to microsoft.public.outlook.program_vba
bac
external usenet poster
 
Posts: 4
Default Select Mailbox

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  
Old January 28th 09, 10:34 PM posted to microsoft.public.outlook.program_vba
Ken Slovak - [MVP - Outlook]
external usenet poster
 
Posts: 5,848
Default Select Mailbox

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 05:06 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.