Get reference to additional Inbox

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


Dim olNS As NameSpace
Dim InputFolder As Outlook.MAPIFolder
Set olNS = Outlook.Application.GetNamespace("MAPI")

' Get reference to folder in users Mailbox for Input
Set InputFolder = olNS.Folders("Procurement, Request").Folders("Inbox")

' all the emails in the shared inbox are represented by:
InputFolder.Items

Tags:

Vba

Outlook