0

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.

1
  • I suspect it not showing has something to do with it not getting assigned to the account, or maybe a bug. I've tried to associate the category with the account but haven't been able to pull it off yet. I have confirmed that a newly created category does show up in the list of possible categories when creating a rule based on a category value.
    – Todd Vanyo
    Commented Feb 4, 2020 at 4:49

1 Answer 1

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

You must log in to answer this question.

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