Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a number of internet emails and have them hooked up to Outlook 2010. I would LOVE to be able to flag emails and set them in categories but since I am using IMAP this doesn't seem to work.

I have done a lot of researching but I can't seem to figure out the easiest and best way to make this happen.

  • Outlook 2010
  • Windows 7
  • using mostly gmail emails
share|improve this question

Use this Macro and add it to the ribbon as a button. Presto! Categories work for IMAP mail. Of course, they're not synchronized to the server, but they'll stick in the local PST file for your IMAP account.

Public Sub Categorize()
    Dim sel As Outlook.Selection
    Set sel = Application.ActiveExplorer.Selection

    If sel Is Nothing Then
        Exit Sub
    End If

    Dim obj As Object
    Dim selCats As String
    Dim gotCats As Boolean

    For Each obj In sel
        If Not gotCats Then
            selCats = obj.Categories
            gotCats = True
            ' ShowCategoriesDialog updates the first one free of charge.
            ' We handle the remaining selected items ourselves.
            obj.Categories = selCats
        End If
    Next obj
End Sub

I wrote a COM add-in to sync categories with IMAP servers that support custom flags, but I'm not going to share it. That'd only give MSFT an excuse to further delay implementing this themselves.

share|improve this answer
Hi "Display Name must be at least". I have tested your macro that works. Nice job. However i want to ask you if you please can share your server sync script with me. That would be helpful to me because we are i a big need of categorizing imap emails. Thanks in advance. please answer to – user142444 Jun 26 '12 at 9:32

In Gmail, you can organize mail using labels and filters. You can also check multiple accounts from Gmail. So this would be easy to solve if you were willing to give up Outlook.

share|improve this answer
not so willing to give up Outlook as I use it to link a lot of things between OneNote – dobrodrummer Jul 21 '11 at 17:45

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .