How to Batch Delete All Receipts in Your Outlook

You may have received various receipts in your Outlook, such as delivery receipts, read receipts or “undeliverable” receipts. If you would like to delete all of them in bulk, you can use the method introduced in this article.

In order to get the immediate information about whether your emails have been delivered and whether recipients have read your emails, you can request delivery and read receipts when composing and sending emails. Under this circumstance, after some time, you’ll find that there are too many such receipts in your mailbox. In this scenario, you must look forward to deleting them in bulk. Here we’ll show you such an approach. It is involved with VBA code, so you can refer to the article – “How to Run VBA Code in Your Outlook” meanwhile.Batch Delete All Receipts in Your Outlook

Batch Delete All Receipts

  1. For a start, launch VBA editor by tapping on “Alt + F11” in Outlook.
  2. Then, in the new window, put the following VBA code into a module.
Sub BatchDeleteAllReceipts()
    Dim objStore As Outlook.Store
    Dim objOutlookFile As Outlook.Folder
    Dim objFolder As Outlook.Folder
    Dim objDeletedItems As Outlook.Items
    Dim objItem As Object
 
    For Each objStore In Outlook.Application.Session.Stores
        Set objOutlookFile = objStore.GetRootFolder
        For Each objFolder In objOutlookFile.Folders
            If objFolder.DefaultItemType = olMailItem Then
               Call ProcessFolders(objFolder)
        End If
    Next
 
    Set objDeletedItems = objOutlookFile.Folders("Deleted Items").Items
    If objDeletedItems.Count > 0 Then
       For Each objItem In objDeletedItems
           On Error Resume Next
           If TypeName(objItem.UserProperties.Find("RECEIPT")) <> "Nothing" Then
              objItem.Delete
           End If
       Next
    End If
 
    MsgBox "Completed!", vbInformation + vbOKOnly
End Sub

Sub ProcessFolders(ByVal objCurFolder As Outlook.Folder)
    Dim i As Long
    Dim objReceipt As Outlook.ReportItem
    Dim objSubfolder As Outlook.Folder
 
    For i = objCurFolder.Items.Count To 1 Step -1
        If TypeOf objCurFolder.Items.Item(i) Is ReportItem Then
           Set objReceipt = objCurFolder.Items.Item(i)
           With objReceipt
                .UserProperties.Add "RECEIPT", olText
                .Save
                .Delete
           End With
        End If
    Next
 
    If objCurFolder.Folders.Count > 0 Then
       For Each objSubfolder In objCurFolder.Folders
           Call ProcessFolders(objSubfolder)
       Next
    End If
End Sub

Put Code in a Module

  1. After that, put cursor in the “BatchDeleteAllReceipts” subroutine.
  2. Finally, press “F5” to run this macro.
  3. When you receive the “Completed” message, you can check your mailboxes. All the receipts have disappear.All Receipts Disappear

Salvage Outlook Data from Corrupt PST

Perhaps you have known that although Outlook is feature rich, it’s still unable to get exempt from errors or corruption. That is to say, if you handle Outlook with no care, your Outlook data file can become compromised. At that time, you have to attempt Outlook data recovery, namely extracting data from damaged Outlook file. Generally, inbox repair tool is not competent enough to accomplish this task. Your resorts are either a powerful external tool, like DataNumen Outlook Repair, or specialized third party recovery service.

Author Introduction:

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

Comments are closed.