How to Open Specific Outlook Folder from Excel?


Effective organisation and communication are essential to remaining productive in the modern digital era. With its extensive functionality and simple design, Microsoft Outlook has established itself as a popular option for organising emails, calendars, and tasks. We frequently discover that we need to directly access particular Outlook folders from other programmes, like Microsoft Excel. Integrating Excel with Outlook can substantially speed up your productivity, whether you need to retrieve emails, analyse data, or carry out particular procedures.

You may save time, work more effectively, and be more productive overall by following these steps. Please be aware that this lesson assumes that you are familiar with the fundamentals of Microsoft Outlook and Excel. To ensure compatibility and access to the most recent features, it is advised that both software be updated and installed on your computer in their most recent versions. So let's begin to effortlessly integrate Excel and Outlook!

Open Specific Outlook Folder from Excel

Here we will first create a VBA module and then edit the references to complete the task. So let us see a simple process to know how you can open a specific Outlook folder from Excel.

Step 1

Consider any Excel workbook.

First, right-click on the sheet name and select View code to open the VBA application.

Right click > View Code.

Step 2

Then click on Insert, select Module, and copy the below code into the text box.

Insert > Module > Copy.

Code

Sub OpenOutlookFolder()
   Dim xOutlookApp As Outlook.Application
   Dim xNameSpace As Outlook.Namespace
   Dim xFolder As Outlook.Folder
   Dim xFolderType As OlDefaultFolders
   On Error Resume Next
   Set xOutlookApp = New Outlook.Application
   Set xNameSpace = xOutlookApp.Session
   Set xFolder = xNameSpace.GetDefaultFolder(olFolderInbox)
   xFolder.Display
   Set xFolder = Nothing
   Set xNameSpace = Nothing
   Set xOutlookApp = Nothing
   Exit Sub
End Sub

Step 3

Then click on Tools, select Reference, check the box named Microsoft Outlook Object Library, and click Ok.

Tools > Reference > Check Box > Ok.

Then save the sheet as a macro-enabled template and click F5 to open the Outlook folder.

Conclusion

In this tutorial, we have used a simple example to demonstrate how you can open a specific Outlook folder from Excel to highlight a particular set of data.

Updated on: 06-Sep-2023

49 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements