How to apply a Category to an Outlook Email using AppleScript

applescriptms office

I have the AppleScript below for Outlook 2016. I am able to mark my mail as read, and I am able to move the email to the appropriate folder. But I can't categorize the email for some reason.

Does anyone know what the proper keyword is called and maybe more importantly, a website to help me lookup AppleScript keywords for Outlook specifically?

tell application "Microsoft Outlook"
    activate
    set msgSet to current messages
    if msgSet = {} then
        error "No Messages selected. Select at least one message."
        error -128
    end if
    set theMsg to item 1 of msgSet
    set theAccount to account of theMsg
    set archiveFolder to folder "Tickets" of folder "Archive" of theAccount
    repeat with aMessage in msgSet
        set aMessage's is read to true
        set aMessage's category to "ForReview"
        move aMessage to archiveFolder
    end repeat
end tell

Best Answer

Take a look here. It is a bit long in the tooth and I've moved on from Outlook since, but I'm getting ready to try this again and will post updates if needed.