Hey guys. just another newbie looking for some help here. I wrote a script that should take a selection of emails and copy them to a single Microsoft word File. Problem is I can’t seem to get the current_email variable into the clipboard to paste to the Word document. What am I doing wrong or is there a better way to do this?
also, I am wondering about the List function and if they are ordered or is there a function that orders them for you? If not does anyone have a quicksort or heapsort function that works in Applescript? I’m going to be dealing with about 4000 emails so I can’t use non-efficient sorting functions.
Anyway, here is my code. Thanx for any help you can offer.
tell application "Mail"
set the_selection to (selection)
repeat with current_selection in the_selection
set current_subject to (subject of current_selection)
set current_content to (content of current_selection)
set current_email to current_subject & return & current_content & return & return
set the clipboard to current_email
tell application "Microsoft Word"
paste
end tell
end repeat
end tell