Advertisement
Guest User

Untitled

a guest
Mar 15th, 2011
4,616
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (*
  2.  
  3.  Move email to Processed folder
  4.  Original code from http://forgetmenotes.blogspot.com/2011/01/mac-outlook-2011-keyboard-shortcut-to.html
  5.  
  6. *)
  7.  
  8. on run {}
  9.  
  10.  tell application "Microsoft Outlook"
  11.  
  12.   -- listSelectedItems : a list of all items selected in Entourage
  13.   set listMessages to current messages
  14.  
  15.   -- Check to make sure items are selected, if not then quit
  16.   if ((count of listMessages) < 1) then return
  17.  
  18.   -- Iterate through selected items
  19.   repeat with objInSelection in listMessages
  20.    
  21.    set listFolders to mail folders
  22.    
  23.    repeat with objFolder in listFolders
  24.    
  25.     if (name of objFolder is "Processed") then
  26.      set gtdFolder to objFolder
  27.     end if
  28.    
  29.    end repeat
  30.    
  31.    if (class of account of objInSelection is not imap account) then
  32.     -- IMAP currently not supported
  33.     move objInSelection to gtdFolder
  34.    end if
  35.    
  36.   end repeat
  37.  
  38.  end tell
  39.  
  40. end run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement