Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in
x
or
x
x
Register
x

or
0
0
0
s2smodern

 How to clear all categories from Outlook?

Supposing, there are lots of items are applied to the color category in your Outlook. If you need to clear all these categories from the items, how could you deal with this job quickly and easily in Outlook?

Clear all categories from a specific folder with Clear All Categories feature

Clear all categories from a specific account with VBA code


Clear all categories from a specific folder with Clear All Categories feature

If you just need to clear the categories in a specific folder, please do as this:

1. Click the folder that you want to remove the color categories, and then press Ctrl + A to select all the items.

2. Then right click, and then choose Categorize > Clear All Categories from the context menu, see screenshot:

doc clear category 1

3. And then, all the color categories in this specific folder have been cleared at once.


Clear all categories from a specific account with VBA code

To clear all categories from all items, such as emails, tasks, contacts, notes and so on from an account, the below VBA code can do you a favor:

1. Click at an account email that you want to clean all categories from, then hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications window.

2. Click Insert > Module, and paste the following macro in the Module Window.

VBA code: Clear all categories from a specific account:

Sub BatchClearAllCategories_AllOutlookItems()
    Dim xCurrentFolder As Outlook.Folder
    Dim xFolder As Folder, xCurFolder As Folder
    Dim xPos As Integer
    Dim xRootFldName As String
    Set xCurFolder = Outlook.ActiveExplorer.CurrentFolder
    xPos = InStr(3, xCurFolder.FolderPath, "\")
    If xPos > 0 Then
        xRootFldName = Mid(xCurFolder.FolderPath, 3, xPos - 3)
    Else
        xRootFldName = Mid(xCurFolder.FolderPath, 3, Len(xCurFolder.FolderPath) - 2)
    End If
    Set xCurrentFolder = Outlook.Application.Session.Folders(xRootFldName)
    For Each xFolder In xCurrentFolder.Folders
        Call ProcessFolders(xFolder)
    Next
    MsgBox "Clear completed!", vbInformation + vbOKOnly, "Kutools for Outlook"
End Sub
Sub ProcessFolders(ByVal CurFld As Outlook.Folder)
    Dim xItem As Object
    Dim i As Integer
    Dim xSubfolder As Outlook.Folder
    If CurFld.Items.Count > 0 Then
        For i = CurFld.Items.Count To 1 Step -1
            Set xItem = CurFld.Items.Item(i)
            xItem.Categories = ""
            xItem.Save
        Next
    End If
    If CurFld.Folders.Count = 0 Then Exit Sub
    For Each xSubfolder In CurFld.Folders
        Call ProcessFolders(xSubfolder)
    Next
End Sub

3. Then, press F5 key to run it, and then a prompt box is popped out to remind you all categories from the selected account have been cleared, see screenshot:

doc clear category 2


100+ Powerful Tools and Features for Outlook 2010 / 2013 / 2016 / 2019 / Office 365:

li-orangeCompatible with Outlook 2010 / 2013 / 2016 / 2019 / Office 365 (32/64);

li-orangeCompatible with Windows XP, Windows Vista, Windows 7 / 8 / 10, Windows Server 2003/2008, Citrix System and Windows Terminal (Remote Desktop) Server;

li-orangeFree trial without feature limitation in 45 days!

READ MORE | FREE DOWNLOAD | BUY NOW

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
Loading comment... The comment will be refreshed after 00:00.

Be the first to comment.