Attach File to Outlook Email
Posted: Wed Jan 02, 2019 7:01 pm
Ive been playing with some automation, and tying it into Outlook, since Outlook disabled automator functions. I figured go hazel and never go back. Im having some issues with the AppleScript and attaching theFile. See below:
Any help would be appreciated.
tell application "Microsoft Outlook"
set newMessage to make new outgoing message with properties {subject:"Invoices from Me"}
make new recipient at newMessage with properties {email address:{name:"Jim Shank", address:"jim.shank@example.com"}}
tell newMessage
repeat with aFile in SelectedItems -- the loop through all selected items
make new attachment with properties {file:theFile}
end repeat
end tell
open newMessage
get newMessage
end tell
return input
Any help would be appreciated.