Closed HBomb341 closed 10 years ago
Spent the last half hour and got it -
Add
set doArchiveCategoryName to "Archive" -- If you create an Outlook category that has this exact name (case sensitive) and assign that category to messages or calendar events the archiving process will force those items indefinitely
-- Checks a categorizable item (e.g. calendar or mail item) for the presence of the 'Archive' category on forceArchiving(anItem) tell application "Microsoft Outlook"
-- Check if item's category list for the 'archive' category
-- [Wrote this procedurally due to problems with using 'every syntax' on category list]
set catList to categories of anItem
set foundArchive to false
repeat with Y from 1 to count of catList
set currentCat to item Y of catList
if name of currentCat is equal to my doArchiveCategoryName then
set foundArchive to true
end if
end repeat
return foundArchive
end tell
end forceArchiving
Edit -
if (time sent of theMessage is less than earliestDate) or my forceArchiving(theMessage) then if (end time of calendarEvent is less than earliestDate) or my forceArchiving(theMessage) then
Force an archiving of an item from a tag of "Archive" - In short exact opposite of "Do not Archive"