I'm using Outlook 2007 - and have my main mailbox: Tait, Mark
I have also added another mailbox to my profile: Procurement, Request
Both appear as top level folders within Outlook:
Mailbox - Tait, Mark> -Conversation History
-Deleted Items
-Drafts
-Inbox
-Junk E-MailMailbox - Procurement, Request
--Conversation History
--Deleted Items
--Drafts
--Inbox
--Junk E-Mail
I can get a reference to my default Inbox (Tait, Mark) using:Set Inbox = ns.GetDefaultFolder(olFolderInbox)
How do I get a reference to the Inbox in the "Procurement, Request" mailbox?
In the Navigation bar on the top of the Outlook Web App screen, click on your name. A drop-down list will appear. Click Open another mailbox. Type the email address of the other mailbox that you want to open, and click Open.
Adding the Mailbox to Outlook (2016 or Newer)In Account Settings, select your current Mailbox and click Change. On the next screen click “More Settings…” Select the Advanced tab and click the Add button. Type in the email address of the shared mailbox then Click OK.
Something like this should do the trick
Dim objNS As Outlook.NameSpace Dim objFolder As Outlook.MAPIFolder Set objNS = GetNamespace("MAPI") Set objFolder = objNS.Folders("Procurement, Request") Set objFolder = objFolder.Folders("Inbox")
This link has some useful code for handling different Inboxes - it may be of interest
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With