devxlogo

Getting MAPI entryID’s From Outlook Folders

Getting MAPI entryID’s From Outlook Folders

This tip is useful if you do Outlook automation with user created Outlook folders. These folders cannot be accessed by the GetDefaultFolder method usually employed in automation techniques. This snippet displays the folder name and MAPI entryID number for the folder. The GetFolderFromID can then be used to access and manipulate the user created folders and the items contained within. You must also make sure that you are referencing the appropriate Outlook library by going to the project and then to the references menu. This example only does one nested level, but the pattern is fairly obvious and should be easy to follow if there are more than two levels of outlook folders.

 Dim oAPP As New Outlook.Application, oNAMESPACE As Outlook.NameSpaceDim i , j As StringDim atopFolders , abottomFolders As Outlook.FoldersDim topFolder , bottomFolder As Outlook.MapiFolderSet oAPP = CreateObject(

See also  5 Benefits of Using Time Tracking Software
devxblackblue

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.

About Our Journalist