Can’t make recipient into type rich text, from AppleScript.
Hello. I have wrote the following code in Apple Script, where recipient is the recipient's name, email is the recipient's email address, body is the content of the email, and sub is the subject of the email.
However, Apple Script error reads 'Can’t make recipient into type rich text' and cannot recognize my recipient's email address. Can I get some help, thanking you in advance?
tell application "Microsoft Excel"
set recipient to value of column 1 of row 2 of sheet 1 of active workbook as text
set email to value of column 2 of row 2 of sheet 1 of active workbook as text
set body to value of column 3 of row 2 of sheet 1 of active workbook as text
set sub to value of column 4 of row 2 of sheet 1 of active workbook as text
end tell
tell application "Mail"
activate
set theMessage to make new outgoing message with properties {subject:sub, content:body, visible:true}
tell theMessage
make new to recipient at end of to recipients with properties {name:recipient, address:email}
end tell
actiate
end tell
MacBook Air 13″, macOS 10.14