Exporting single page from PDF as a JPG

UPDATE: Using the AppleScript at the bottom of this post, I was able to address the auto-send component of my request: Help on a Mac Automator Workflow - Add Attachment to Email - #6 by hawks28

Here’s the code for anyone else who wants to use it, but doesn’t want to retype it from the image like I had to ;))

set theAttachment1 to (POSIX path of theFile)
set subject_ to "Phone Bill"
set the_content to "Here's your phone bill. Have a great day!"

tell application "Mail"
set newMessage to make new outgoing message with properties {subject:subject_, content:the_content & return & return}
tell newMessage
set visible to false
set sender to "senderaddress@url.com" --<<<<----------------(* change this*)
make new to recipient at end of to recipients with properties {address:"recipientaddress@url.com"} --<<<<----------------(*change this email address too *)
make new attachment with properties {file name:theAttachment1} at after the last paragraph

delay 5

(* change save to send to send*)

send --<<<<---------------- change save to send to send or send to save to save to drafts

(* change save to send to send*)

end tell

end tell

Here’s the additional Hazel rule I added, which then moves the PDF to the trash once the email has been sent.

2 Likes