Page 1 of 1

apple script

PostPosted: Wed Mar 16, 2022 6:28 pm
by Cristina Comas
Until recently I used an automator workflow to create an email in outlook attaching the file processed by hazel, but on the new mac I don't have the office actions for automator. To create the email with the attached file I have created an applescript, but it doesn't work, it doesn't attach the file to the message. Any solution. Thanks:

tell application "Microsoft Outlook"
set theContent to ""
set theAttachment to theFile
set theMessage to make new outgoing message with properties {subject:""}
tell content
make new attachment with properties {file:(theFile)} at the end of theMessage
end tell
open theMessage
end tell

Re: apple script

PostPosted: Thu Mar 17, 2022 9:48 am
by Mr_Noodle
Have you tried it outside of Hazel?