How to Auto Delete an Outlook Task after Marking It Complete

By default, the tasks that have been marked complete will still exist in the Tasks folder. If you wish that Outlook can automatically delete the completed tasks, you can utilize the method introduced in this article.

As you can see, after you mark an Outlook task complete, the task will be shown in grey strikethrough font. But it still exists in the Tasks folder, mixed up with the uncompleted tasks. In this way, your tasks may be cluttered up. Thus, many users wish that Outlook can automatically delete a task after marking it complete. Now, in the followings, we will share you a relevant method.

Auto Delete an Outlook Task after Marking It Complete

Auto Delete an Outlook Task after Marking It Complete

  1. To begin with, start your Outlook program.
  2. Then in the main Outlook screen, you ought to press “Alt + F11” key buttons.
  3. Subsequently, in the “Microsoft Visual Basic for Applications” window, you’ll be demanded to locate and open the “ThisOutlookSession” project.
  4. Next, you have to copy the following VBA code into this project.
Public WithEvents objTasks As Outlook.Items
Public WithEvents objDeletedItems As Outlook.Items

Private Sub Application_Startup()
    Set objTasks = Outlook.Application.Session.GetDefaultFolder(olFolderTasks).Items
    Set objDeletedItems = Application.Session.GetDefaultFolder(olFolderDeletedItems).Items
End Sub

Private Sub objTasks_ItemChange(ByVal Item As Object)
    Dim objTask As Outlook.TaskItem
    If TypeOf Item Is TaskItem Then
       Set objTask = Item
       'After marking the task complete
       If objTask.Complete = True Then
          'Delete it
       End If
    End If
End Sub

'Permanently delete the task
Private Sub objDeletedItems_ItemAdd(ByVal Item As Object)
    If Item.Class = olTask Then
    End If
End Sub

VBA Code - Auto Delete an Outlook Task after Marking It Complete

  1. After that, you need to assign a digital certificate to this new VBA project.
  • Just click on the ‘Tools” in the toolbar.
  • Then select “Digital Signature” from the drop down list.
  • In the popup dialog box, follow onscreen instructions to complete it.
  1. Later you should alter your Outlook macro settings to permit the signed VBA project.
  2. Finally you restart your Outlook to activate the new VBA code.
  3. From now on, every time when you mark a task complete, this task will be automatically and permanently deleted.

Resort to a Remarkable Repair Tool

To be honest, Outlook provides users with a myriad of excellent capabilities. But, it doesn’t mean that it is flawless. It has a deadly vulnerability. It is susceptible to errors and corruption. Therefore, if you would like to safeguard your Outlook file against damage, you had better back up your PST file at regular intervals. Plus, it is prudent to invest in a prominent and reliable Outlook recovery utility, such as DataNumen Outlook Repair.

Author Introduction:

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

Leave a Reply

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