Outlook - How To Set-Up a Unified Mailbox

From Micylou WIKI
This is the latest revision of this page; it has no approved revision.
Jump to navigation Jump to search
Source: DataSource
Language: English
Topic: Microsoft
SubTopic: Outlook
Last Edit By: DochyJP
LastEdit: 2021-07-07
Document type: Documentation
Status: Active
Access: free

Download this page as PDF

When you have multiple accounts (and therefore emails) set up in Outlook, Microsoft does not have (yet) the functionality to view all messages in all inboxes at once.

This shows you how to do it.

Open your Visual Basic Editor (alt-F11) and create the following macro :

Sub UnifiedInbox()
Dim xExplorer As Outlook.Explorer
Dim xSearch As String
On Error Resume Next
xSearch = "folderpath:Inbox"
Set xExplorer = Outlook.Application.ActiveExplorer
xExplorer.Search xSearch, olSearchScopeAllFolders
Set xApp = Nothing
End Sub

You can do the same for displaying ALL sent items from all mailboxes at once too :

Sub UnifiedSentbox()
Dim myOlApp As New Outlook.Application
txtSearch = "folder: (Sent Mail) sent: (this week)"
myOlApp.ActiveExplorer.Search txtSearch, olSearchScopeAllFolders
Set myOlApp = Nothing
End Sub

From there, open the visualisation of your macros (alt-F8) and choose the query to run.

It is that easy !