Get reference to additional Inbox

后端 未结 3 2131
情歌与酒
情歌与酒 2020-11-22 06:42

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

3条回答
  •  感情败类
    2020-11-22 07:17

    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
    

提交回复
热议问题