If you want to better organize your Outlook items via color category, but you often forget color categorizing items, you can use the method introduced in this article to mandatorily color categorize all your Outlook items.
In order to keep your Outlook items better organized, you can make use of color category feature to classify various items in your Outlook. However, in reality, for most users, it is a bit difficult to stick to color categorizing items. In other words, it is very common to forget assigning color categories to items. Therefore, many long for a method to force them to categorize item, namely mandatorily color categorize items. Without any doubts, there is no such a direct feature. But you can use VBA to get it. In the followings, we will expose the detailed steps and VBA codes to you.
Mandatorily Color Categorize All Your Outlook Items
- In the first place, start your Outlook program.
- Then press “Alt + F11” key buttons in the Outlook main window.
- Next in the popup “Microsoft Visual Basic for Applications” window, open the “ThisOutlookSession” project.
- Subsequently, copy and paste the following VBA codes into this project.
Public WithEvents objExplorer As Outlook.Explorer Public strPrompt As String, nWarning As Integer Private Sub Application_Startup() Set objExplorer = Outlook.Application.ActiveExplorer End Sub Private Sub objExplorer_SelectionChange() Dim objItem As Object Dim strItemType As String On Error GoTo ErrorHandler Set objItem = objExplorer.Selection.Item(1) strItemType = Replace(TypeName(objItem), "Item", "") If objItem.Categories = "" Then strPrompt = "You haven't assigned a category to the " & strItemType & " - " & objItem.Subject & "!" & vbCrLf & vbCrLf & "Do you want to categorize it now?" nWarning = MsgBox(strPrompt, vbExclamation + vbYesNo, "Warning: No Category!") If nWarning = vbYes Then objItem.ShowCategoriesDialog End If End If ErrorHandler: Exit Sub End Sub 'Force you to assign category to the outgoing items before sending Private Sub Application_ItemSend(ByVal objItem As Object, Cancel As Boolean) If objItem.Categories = "" Then strPrompt = "You haven't assigned a category to current item!" & vbCrLf & vbCrLf & "Do you want to categorize it now?" nWarning = MsgBox(strPrompt, vbExclamation + vbYesNo, "Warning: No Category!") If nWarning = vbYes Then objItem.ShowCategoriesDialog End If End If End Sub
- After that, sign this code.
- Later change your Outlook macro settings to permit digitally signed macros.
- Finally restart your Outlook to activate the new VBA project.
- From now on. When you select any item which haven’t been categorized, you will receive a warning like the following screenshot:
- As long as you select “Yes”, the “Color Categories” dialog box will show up, in which you can assign a color category to the currently selected item.
- Moreover, when you try to send an un-categorized outgoing item, you will get the warning as well.
Handle Vexing Outlook Issues
You may have ever encountered various problems in your Outlook. As usual, you can simply use Scanpst.exe to fix the small issues. However, if the inbuilt fix tool cannot make effects, you have no choice but to resort to a more potent tool, such as DataNumen Outlook Repair that can fix PST errors without breaking a sweat.
Shirley Zhang is a data recovery expert in DataNumen, Inc., which is the world leader in data recovery technologies, including SQL Server damage and outlook repair software products. For more information visit www.datanumen.com