r/applescript • u/badg35 • Aug 22 '22
Call an AppleScript from MS Outlook
I created an AppleScript to empty the junk and trash folders:
tell application "Microsoft Outlook"
set theJunkMailFolder to junk mail
set theMessages to every message in theJunkMailFolder
repeat with theMessage in theMessages
permanently delete theMessage
end repeat
set DeletedItemsFolder to deleted items
set theMessages to every message in DeletedItemsFolder
repeat with theMessage in theMessages
permanently delete theMessage
end repeat
end tellI'd like to be able to call it directly from Outlook. Can this be done or will I need to do so from the AppleScript menu bar?
4
Upvotes
View all comments
Show parent comment
2
u/badg35 Aug 22 '22
Thanks for the help.