Guest User

Untitled

a guest
Sep 18th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. tell application "Microsoft Outlook"
  2. -- get the currently selected message or messages
  3. -- NOTE in this version it fails if the Outlook Reminder window is open, even if you select a message in the main window.
  4. set selectedMessages to current messages
  5.  
  6. -- if there are no messages selected, warn the user and then quit
  7. if selectedMessages is {} then
  8. display dialog "Please select a message first and then run this script." with icon 1
  9. return
  10. end if
  11.  
  12. set aMessage to item 1 of selectedMessages
  13. set emailAcct to account of aMessage
  14. set inBoxFolder to folder "Inbox" of emailAcct
  15. set ArchiveFolder to folder "IZ - Archive" of inbox
  16.  
  17. repeat with theMessage in selectedMessages
  18. move theMessage to IZArchiveFolder
  19. end repeat
  20. end tell
Add Comment
Please, Sign In to add comment