Sunday, September 19, 2021

Access outlook folder by name using vba

 Sub accessFolderbyName()

Dim olApp, olAccts, olInspect As Object
Set olApp = CreateObject("Outlook.Application")
Dim olFolder As Outlook.MAPIFolder
Set olFolder = olApp.GetNamespace("MAPI").Folders("allsourav@hotmail.com").Folders("Sent Items")

End Sub

No comments:

Post a Comment