How to Quickly Find out All Outlook Items Related to a Specific Contact

If you would like to quickly find out all Outlook items related to a specific contact without accessing the contact’s “Activities” pane troublesomely, you can utilize the method shared in this article.

In general, when you would like to find all Outlook items involved with a contact, you can double click on the contact and then click on the “Activities” button in the “Show” group. However, many users hope that they can quickly get these related items simply right click a contact and choose a “Related Items” option, similar to “Find Related” option in the Email’s context menu. Now, in the followings, we will teach you how to realize it.

Quickly Find out All Outlook Items Related to a Specific Contact

Quickly Find out All Outlook Items Related to a Specific Contact

  1. To start with, launch your Outlook program.
  2. Then, in the emerging Outlook main screen, you could press “Alt + F11” keys.
  3. Subsequently, you will get access to VBA editor window, in which you need to locate and double click on the “ThisOutlookSession” project on the left side.
  4. In the displaying “ThisOutlookSession” project window, you need to copy the following VBA code into it.
Sub Application_ItemContextMenuDisplay(ByVal CommandBar As Office.CommandBar, ByVal Selection As Selection)
    Dim objCommandBarButton As Office.CommandBarButton
    'Add "Related Items" to the ContactItem's Context Menu
    If (Selection.count = 1) And (Selection.Item(1).Class = olContact) Then
       Set objCommandBarButton = CommandBar.Controls.Add(msoControlButton)
       With objCommandBarButton
            .Style = msoButtonIconAndCaption
            .Caption = "Related Items"
            .FaceId = 25
            .OnAction = "Project1.ThisOutlookSession.FindRelatedItems"
      End With
    End If
End Sub

Sub FindRelatedItems()
    Dim strFilter As String
    Dim objContact As Object
    Dim objSearchExplorer As Outlook.Explorer
    Set objContact = Application.ActiveExplorer.Selection.Item(1)
    Set objSearchExplorer = Application.Explorers.Add(Application.Session.GetDefaultFolder(olFolderInbox))
    If objContact.Class = olContact Then
       'Specify the Search Filter on Basis of Its Email Addresses
       strFilter = "from:(" & Chr(34) & objContact.Email1Address & Chr(34) & ") OR " & " to:(" & Chr(34) & objContact.Email1Address & Chr(34) & ") OR " & "cc:(" & Chr(34) & objContact.Email1Address & Chr(34) & ")"
       If objContact.Email2Address <> "" Then
          strFilter = strFilter & " OR from:(" & Chr(34) & objContact.Email2Address & Chr(34) & ") OR " & " to:(" & Chr(34) & objContact.Email2Address & Chr(34) & ") OR " & "cc:(" & Chr(34) & objContact.Email2Address & Chr(34) & ")"
       End If
       If objContact.Email3Address <> "" Then
          strFilter = strFilter & " OR from:(" & Chr(34) & objContact.Email3Address & Chr(34) & ") OR " & " to:(" & Chr(34) & objContact.Email3Address & Chr(34) & ") OR " & "cc:(" & Chr(34) & objContact.Email3Address & Chr(34) & ")"
       End If
    End If
    'Start Searching
    With objSearchExplorer
         .Search strFilter, olSearchScopeAllOutlookItems
         .ShowPane olFolderList, False
         .ShowPane olNavigationPane, False
         .ShowPane olOutlookBar, False
         .ShowPane olToDoBar, False
         'Show Search Results in New Window
    End With
End Sub

VBA Code - Find out All Outlook Items Related to a Specific Contact

  1. After that, it is suggested to sign this code and change Outlook macro settings to permit digitally signed macros.
  2. Eventually you can take a shot.
  • Firstly, select a source contact.
  • Then, right click on it and choose “Related Items” from the context menu.Choose “Related Items” from Contact's context menu
  • At once, a new window will show up, where all the Outlook items related to the selected contact have been included, like the screenshot below:Search Results

Restore Data from Damaged Outlook File

No application is flawless. The same holds true for Outlook. It can get corrupt for various factors, including hardware failures, software malfunctions, viruses and malware attacks and so on. All of these factors can damage your Outlook data like a breeze. Hence, if unfortunately you suffer PST damage, a remarkable and potent Outlook repair tool will be badly needed. In this case, DataNumen Outlook Repair is highly recommended due to its high PST recovery rate.

Author Introduction:

Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including fix sql and outlook repair software products. For more information visit

Leave a Reply

Your email address will not be published. Required fields are marked *