Created
May 14, 2021 18:25
-
-
Save damc-dev/a13100061060057a96f871876b488e7f to your computer and use it in GitHub Desktop.
Easy way to move outlook messages to my most used folders
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
tell application "Microsoft Outlook" | |
activate | |
set selectedMessages to selected objects | |
if selectedMessages is {} then | |
display notification "Please select a message in Outlook before running the script!" | |
else | |
set folderChoices to {"Inbox", "2 - Action", "3 - Waiting For", "4 - Reference", "5 - Archive"} | |
set selectedFolders to choose from list folderChoices with prompt "Select folder to move to:" default items "5 - Archive" | |
set selectedFolder to item 1 of selectedFolders | |
set destFolder to mail folder selectedFolder | |
repeat with theMessages in selectedMessages | |
move theMessages to destFolder | |
end repeat | |
end if | |
end tell |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment