-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathArchiveSelection.applescript
More file actions
45 lines (31 loc) · 1007 Bytes
/
Copy pathArchiveSelection.applescript
File metadata and controls
45 lines (31 loc) · 1007 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
(*
Move email to Processed folder
Original code from http://forgetmenotes.blogspot.com/2011/01/mac-outlook-2011-keyboard-shortcut-to.html
*)
on run {}
tell application "Microsoft Outlook"
-- listSelectedItems : a list of all items selected in Entourage
set selectedMessages to current messages
-- Check to make sure items are selected, if not then quit
if ((count of selectedMessages) < 1) then return
set allFolders to mail folders
repeat with aFolder in allFolders
if (name of aFolder is "Archive") then
set destinationFolder to aFolder
end if
end repeat
try
destinationFolder
on error
error "No folder found called 'Archive'"
end try
-- Iterate through selected items
repeat with aMessage in selectedMessages
if (class of account of aMessage is not imap account) then
-- IMAP currently not supported
set aMessage's is read to true
move aMessage to destinationFolder
end if
end repeat
end tell
end run