Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Mar 15th, 2011  |  syntax: AppleScript  |  size: 0.91 KB  |  views: 1,960  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  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