How to Batch Print All Tasks Linked or Assigned to a Specific Contact in Outlook

When checking all the tasks linked or assigned to a specific contact, you may want to print them as well. Now, in this article, we will share you a method to batch print such tasks.

To check the tasks linked or assigned to a contact, you can open this contact and access its “Activities” page, in which all such tasks are gathered here. But, if you’d like to print these tasks, you need to open them and then print one by one. Thus, obviously, it is a bit troublesome. Now, in the followings, we will introduce a way to batch print these tasks.

Contact Activities

Batch Print All Tasks Linked or Assigned to a Specific Contact

  1. At the very outset, select a contact that you want.
  2. Then, access Outlook VBA editor by referring to “How to Run VBA Code in Your Outlook“.
  3. Next, copy the following VBA code into a module.
Dim objContact As ContactItem

Sub PrintTasksLinkedOrAssignedToSpecificContact()
    Dim objStore As Outlook.Store
    Dim objOutlookFile As Outlook.Folder
    Dim objFolder As Outlook.Folder
    'Get the selected contact
    Set objContact = Outlook.Application.ActiveExplorer.Selection.Item(1)
    For Each objStore In Application.Session.Stores
        Set objOutlookFile = objStore.GetRootFolder
        For Each objFolder In objOutlookFile.Folders
            If objFolder.DefaultItemType = olTaskItem Then
               Call ProcessFolders(objFolder)
            End If
End Sub

Sub ProcessFolders(ByVal objCurFolder As Outlook.Folder)
    Dim objTask As Outlook.TaskItem
    Dim objSubfolder As Outlook.Folder
    For Each objTask In objCurFolder.Items
        'Print linked tasks to the contact
        If objTask.Links.Count > 0 Then
           i = 0
           Do Until i = objTask.Links.Count
              i = i + 1
              If objTask.Links(i).Name = objContact.FullName Then
                 Exit Do
              End If
         'Print assigned tasks to the contact
         ElseIf (objTask.Owner = objContact.FullName) Or (objTask.Owner = objContact.Email1DisplayName) Or (objTask.Owner = objContact.Email1Address) Or (objTask.Owner = objContact.Email2DisplayName) Or (objTask.Owner = objContact.Email2Address) Or (objTask.Owner = objContact.Email3DisplayName) Or (objTask.Owner = objContact.Email3Address) Then
         End If
    If objCurFolder.Folders.Count > 0 Then
       For Each objSubfolder In objCurFolder.Folders
           Call ProcessFolders(objSubfolder)
    End If
End Sub

VBA Code - Batch Print All Tasks Linked or Assigned to a Specific Contact

  1. After that, click into the first subroutine.
  2. Later, click “Run” icon in toolbar to run this macro right now.
  3. When macro finishes, all the tasks linked or assigned to the selected contact will be printed out, as shown in the following screenshot.Printed Tasks

Prevent Outlook Data Loss

When it comes to avoiding data loss, undoubtedly, regular data backups must be the first and foremost measure. The same holds true for Outlook data. That is to say, if you are not ready to lose your Outlook data, you have to make Outlook data backups on a regular basis. Besides, in order to get immediate rescue in the event of Outlook corruption, you are better off keeping a potent and credible PST repair tool, like DataNumen Outlook Repair, which is well-versed in recovering corrupt Outlook file.

Author Introduction:

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

Comments are closed.