2 Methods to Auto Show Private Calendar Items in a Specific Color in Your Outlook

In order to distinguish private items and non-private items in calendar more easily, you may wish to auto show private items in a specific color, such as red to highlight them. This post will introduce 2 ways to realize it.

Many users prefer to classify calendar items based on whether they are private or not. Since, in calendar, private items have no manifest differences in vision by default, so as to identify private items much more easily, you can let Outlook auto show them in a specific color. Here we will teach you 2 approaches to get it.

Method 1: Use “Conditional Formatting”

  1. For a start, launch Outlook and access “Calendar” pane.
  2. Then, turn to “View” tab and change view to “Calendar”.Calendar View
  3. Next, hit “View Settings” button.
  4. In the popup dialog box, click “Conditional Formatting”.Conditional Formatting
  5. Later, in the subsequent dialog, click “Add” and enter a name, like “Private”.
  6. Then, select a specific color, like “Dark Red” for my instance.Select Conditional Formatting Color
  7. After that, click “Condition” button.
  8. In the next dialog box, switch to “Advanced” tab and add the following filter:
Sensitivity > equals > private

Set Select Conditional Formatting Color Filter

  1. Finally, click “Add to List” and several “OK” to save this formatting rule.
  2. From now on, all the private calendar items will be shown in “Dark Red”.Private Items in Dark Color

Method 2: Use “Auto Color Categorize” in VBA

  1. First off, create a new color category called “Private” with a specific color.
  2. Next, launch Outlook VBA editor according to “How to Run VBA Code in Your Outlook“.
  3. Then, put the following code into “ThisOutlookSession” project.
Private WithEvents objCalendarItems As Outlook.Items

Private Sub Application_Startup()
     Set objCalendarItems = Outlook.Application.Session.GetDefaultFolder(olFolderCalendar).Items
End Sub

Private Sub objCalendarItems_ItemAdd(ByVal Item As Object)
    Dim objCalendarItem As Outlook.AppointmentItem

    Set objCalendarItem = Item

    If objCalendarItem.Sensitivity = olPrivate Then
       objCalendarItem.Categories = "Private"
    Else
       Call RemovePrivateCategory(objCalendarItem, "Private")
    End If

    objCalendarItem.Save
End Sub

Private Sub objCalendarItems_ItemChange(ByVal Item As Object)
    Dim objCalendarItem As Outlook.AppointmentItem

    Set objCalendarItem = Item

    If objCalendarItem.Sensitivity = olPrivate Then
       objCalendarItem.Categories = "Private"
    Else
       Call RemovePrivateCategory(objCalendarItem, "Private")
    End If

    objCalendarItem.Save
End Sub

Sub RemovePrivateCategory(ByVal objCurrentItem As Object, ByRef strCategory As String)
    Dim varCategories As Variant
    Dim i As Long

    varCategories = Split(objCurrentItem.Categories, ",")

    If UBound(varCategories) >= 0 Then
       For i = 0 To UBound(varCategories)
           If Trim(varCategories(i)) = strCategory Then
              varCategories(i) = ""
              objCurrentItem.Categories = Join(varCategories, ",")
              Exit Sub
           End If
      Next
    End If
End Sub

VBA Code - Auto Show Private Calendar Items in a Specific Color

  1. Eventually, restart Outlook to activate this macro.
  2. Now, you can have a try.
  • Pitch on an item in the default calendar.
  • Then, change it to “Private”.Change a Calendar Item to Private
  • At once, “Private” color category will be assigned to this item, as shown in the following screenshot.Auto Assigned "Private" Color Category

Rescue Your Valuable Outlook Data

Since Outlook is vulnerable, many users have been ever subject to PST corruption. In general, when encountering it, you can first try the inbox repair tool to fix the file. Yet, if it fails, you can resort to a more potent and reliable external utility, like 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 sql corruption and outlook repair software products. For more information visit www.datanumen.com

Leave a Reply

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