ForumsTips & TricksApplescript to forward emails as tasks in Outlook 2011 for Mac


Applescript to forward emails as tasks in Outlook 2011 for Mac
Author Message
erika

Posted: Oct 17, 2011
Score: 0 Reference
I recently upgraded to Outlook 2011 as my Exchange client, and even though iOS 5 will sync tasks now, I really prefer the Toodledo interface for tasks.

I have cobbled together a script that will allow me to forward my tasks from my Outlook email to toodledo with a minimum of keystrokes. It allows you to use the Toodledo email syntax to add metadata via the subject line (I have put an example subject line in the dialog box to help remind me what all the shortcuts are). Then, it files the email into an Action folder of your choosing. I don't guarantee that there isn't a better way of doing this, but it works for me. Let me know if you make improvements on it!

Erika

----cut below this line----


(*
Create Toodledo task from Message
Adapted from Microsoft "Create Task from Message" by Erika Orrick
2011
*)

tell application "Microsoft Outlook"

-- get the currently selected message or messages
set selectedMessages to current messages
set taskRecipient to {""}
set actionFolder to ""

-- if there are no messages selected, warn the user and then quit
if selectedMessages is {} then
display dialog "Please select a message first and then run this script." with icon 1
return
end if

set subjectLine to ""
set dialogText to "Please indicate a subject line for the email
Finish Status Report ! #next friday *ProjectA @work $Active %tag1, tag2 ~1hour &Every Friday -home"
set buttonList to {"OK", "Cancel"}

repeat with theMessage in selectedMessages

-- get the information from the message, and store it in variables
set theName to subject of theMessage
set theCategory to category of theMessage
set thePriority to priority of theMessage
set theContent to content of theMessage

set dialogReply to display dialog dialogText default answer theName buttons buttonList default button "OK"

if button returned of dialogReply is "Cancel" then
return
else
set subjectLine to text returned of dialogReply
set newMessage to make new outgoing message with properties {subject:subjectLine, content:theContent}
make new recipient of newMessage with properties {email address:{address:taskRecipient}}
move theMessage to folder actionFolder
send newMessage

end if

end repeat

end tell
You cannot reply yet

U Back to topic home

R Post a reply

To participate in these forums, you must be signed in.