Greetings,
Sounds weird, but I have a mac word doc that I web preview in Safari and use Safari "share>email this page" to get the entire html content into the email. I have a script already that takes email addresses from excel one at a time and inserts it into the recipients and inserts the subject as well. I just can't figure out the applescript commands to send the active safari page into mac mail. Sorry if this is too complicated.
Your assistance is greatly respected
Cheers
Rob
set {firstName, eAddress} to getData()
repeat with i from 1 to count firstName
tell application "Mail"
activate
set mymail to make new outgoing message at the beginning of outgoing messages with properties {subject:"Your Complimentary Chocolate Recipe Book"}
tell mymail
makenewto recipientat beginning of to recipientswith properties {address:itemi of eAddress}
end tell
--show message window (otherwise it's hidden)
set visible of mymail to true
--bring Mail to front
activate
sendmymail
set m to random number from 45 to 300
delaym
end tell
end repeat
on getData()
set colA to {}
set colB to {}
tell application "Microsoft Excel"
activate
tell active sheet
set lastRow to first row index of (get end (last cell of column 1) direction toward the top)
repeat with i from 3 to lastRow
set end of colA to (value of range ("A" & i))
set end of colB to (value of range ("B" & i))
end repeat
end tell
end tell
return {colA, colB}
end getData
Sounds weird, but I have a mac word doc that I web preview in Safari and use Safari "share>email this page" to get the entire html content into the email. I have a script already that takes email addresses from excel one at a time and inserts it into the recipients and inserts the subject as well. I just can't figure out the applescript commands to send the active safari page into mac mail. Sorry if this is too complicated.
Your assistance is greatly respected
Cheers
Rob
set {firstName, eAddress} to getData()
repeat with i from 1 to count firstName
tell application "Mail"
activate
set mymail to make new outgoing message at the beginning of outgoing messages with properties {subject:"Your Complimentary Chocolate Recipe Book"}
tell mymail
makenewto recipientat beginning of to recipientswith properties {address:itemi of eAddress}
end tell
--show message window (otherwise it's hidden)
set visible of mymail to true
--bring Mail to front
activate
sendmymail
set m to random number from 45 to 300
delaym
end tell
end repeat
on getData()
set colA to {}
set colB to {}
tell application "Microsoft Excel"
activate
tell active sheet
set lastRow to first row index of (get end (last cell of column 1) direction toward the top)
repeat with i from 3 to lastRow
set end of colA to (value of range ("A" & i))
set end of colB to (value of range ("B" & i))
end repeat
end tell
end tell
return {colA, colB}
end getData