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”
- For a start, launch Outlook and access “Calendar” pane.
- Then, turn to “View” tab and change view to “Calendar”.
- Next, hit “View Settings” button.
- In the popup dialog box, click “Conditional Formatting”.
- Later, in the subsequent dialog, click “Add” and enter a name, like “Private”.
- Then, select a specific color, like “Dark Red” for my instance.
- After that, click “Condition” button.
- In the next dialog box, switch to “Advanced” tab and add the following filter:
Sensitivity > equals > private
- Finally, click “Add to List” and several “OK” to save this formatting rule.
- From now on, all the private calendar items will be shown in “Dark Red”.
Method 2: Use “Auto Color Categorize” in VBA
- First off, create a new color category called “Private” with a specific color.
- Next, launch Outlook VBA editor according to “How to Run VBA Code in Your Outlook“.
- 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
- Eventually, restart Outlook to activate this macro.
- Now, you can have a try.
- Pitch on an item in the default calendar.
- Then, change it to “Private”.
- At once, “Private” color category will be assigned to this item, as shown in the following screenshot.
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.
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