How to Auto Add a Reminder to an Outlook Email after Assigning a Specific Color Category to It

If you want to let Outlook auto add a reminder to an email after a specific category is assigned to it, you can read this article. Here we will introduce a handy method to you.

As we all know, when we flag an email, Outlook will auto add a reminder to it. But, some users also wish Outlook to auto add reminder when they assign a specific color category to an email. Obviously, Outlook doesn’t support this natively. Thus, thereinafter, we’ll introduce a method to get it with VBA. As for how to apply VBA, you can refer to “How to Run VBA Code in Your Outlook“.

Auto Add a Reminder to an Outlook Email after Assigning a Specific Color Category to It

Auto Add a Reminder to an Email When Assigning a Specific Color Category to It

  1. At the beginning, trigger Outlook VBA editor.
  2. Then, in the new window, put the VBA code below into “ThisOutlookSession” project.
Private WithEvents objInspectors As Outlook.Inspectors
Private WithEvents objExplorer As Outlook.Explorer
Private WithEvents objMail As Outlook.MailItem
Private strSpecificCategory As String

Private Sub Application_Startup()
    Set objInspectors = Outlook.Application.Inspectors
    Set objExplorer = Outlook.Application.ActiveExplorer
    'Change the specific color category name
    strSpecificCategory = "Red Category"
End Sub

Private Sub objExplorer_SelectionChange()
    On Error Resume Next
    If objExplorer.Selection.Item(1).Class = olMail Then
       Set objMail = objExplorer.Selection.Item(1)
    End If
End Sub

Private Sub objInspectors_NewInspector(ByVal Inspector As Inspector)
    If Inspector.CurrentItem.Class = olMail Then
       Set objMail = Inspector.CurrentItem
    End If
End Sub

Private Sub objMail_PropertyChange(ByVal Name As String)
    Dim varCategoryArray As Variant
 
    If Name = "Categories" Then
       If objMail.Categories <> "" Then
          varCategoryArray = Split(objMail.Categories, ",")
          If varCategoryArray(0) = strSpecificCategory Then
             With objMail
                 .ReminderSet = True
                 'Change the reminder time to your liking
                 .ReminderTime = Now + 1 ' ==> Tomorrow
                 .Save
             End With
          End If
       End If
    End If
End Sub

VBA Code - Auto Add a Reminder to an Email When Assigning a Specific Color Category to It

  1. After that, position cursor in the “Application_Startup” subroutine and tap on “F5” key button.
  2. Subsequently, you can take a shot. Here is my instance.
  • First off, select an email.
  • Then, assign the “Red Category” to it.
  • At once, you will find a reminder added to this email, like the following screenshot.New Reminder to Email

Outlook Is Error Prone

Though Outlook provides users with many functions, it still can’t be exempt from errors or crash, like other common applications. In this scenario, it requires you to monitor your Outlook health all the time. For instance, you ought to beware of email borne viruses, keep shutting down Outlook in a proper manner, etc. Yet, at times, you may still encounter Outlook file damage. At that point, you need resort to a proficient Outlook fix tool, such as DataNumen Outlook Repair. It can recover Outlook data from damaged file like a cork.

Author Introduction:

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

Comments are closed.