Syncing and deleting categories in Outlook?

I created a bunch of Outlook categories via AppleScript using the following command:

make new category with properties {name:"Snooze2", color:"blue"}

These new categories work as expected, but don't show in the 'Categories' window (Preferences → Personal Settings → Categories) and also will not be available on other machines using the same account.

Do you know how to create categories that will behave like the ones created using the Categories window?

Also related, does anybody know how to delete a category via AppleScript? Since they don't show in the Categories window, I can only delete them via AppleScript.


Solution 1:

You can delete the category by finding its ID and using the command:

delete category id <#>

So something like this works fine:

tell application "Microsoft Outlook"
    set badCategory to "foo"
    set allCategories to every category
    repeat with varCategory in allCategories
        if name of varCategory is badCategory then
            delete category id of varCategory
            log "name = " & name of aTag as string
            log "id = " & id of aTag as string
            log "deleting it!"
            exit repeat
        end if
    end repeat
end tell