I'm seeing some weird categorization behavior on Outlook 2016 on El Capitan.
In the GUI's Category list, there's a category called, say, "Category1", with the color red. When I use the GUI, that category gets applied correctly.
But when I use AppleScript to apply the "Category1" label, a different color is applied, and there's no checkmark next to "Category1" in the GUI. It's like there are two categories with the same name, and AppleScript and the GUI are pointing to different ones.
Has anyone else seen this, or have a fix?
Thanks.
Updated: Here's a code snippet showing how I'm using AppleScript. Also, note that many of my categories are imported from a Windows PST file.
tell application "Microsoft Outlook"
-- get the currently selected message or messages
set selectedMessages to current messages
-- if there are no messages selected, warn the user and then quit
if selectedMessages is {} then
display dialog "Please select a message first and then run this script." with icon 1
return
end if
repeat with theMessage in selectedMessages
set categoryList to get categories of theMessage
set cleanCategoryList to {}
set wasCategoryRemoved to 0
repeat with theCategory in categoryList
if name of theCategory is "Category1" then
set wasCategoryRemoved to 1
else
set end of cleanCategoryList to theCategory
end if
end repeat
if wasCategoryRemoved is 0 then
set end of cleanCategoryList to category "Category1"
end if
set categories of theMessage to cleanCategoryList
end repeat
end tell