I have a rtf-file with the text I often have to send by mail. Some words have to be replaced by specific words depending on the recipient (but that is not my question
). Some words are in bold (because they are more important),...
I want to write an AppleScript, which copies the text from the file into a new mail. But, the formatting of my text is always lost, what ever I try. the last thing I have is:
I have already a working AppleScript with System Events and keystroke,... but now, with the lockdown I have time to look for a more elegant script (since, when running the script, I press on a key my script is going down the tubes)
I want to write an AppleScript, which copies the text from the file into a new mail. But, the formatting of my text is always lost, what ever I try. the last thing I have is:
AppleScript:
set textB to ((path to desktop as Unicode text) & "textB.rtf")
tell application "TextEdit"
open file textB
set theContent to the text of document 1
end tell
tell application "Mail"
tell (make new outgoing message with properties {subject:"test", content:theContent, visible:true})
end tell
end tell
I have already a working AppleScript with System Events and keystroke,... but now, with the lockdown I have time to look for a more elegant script (since, when running the script, I press on a key my script is going down the tubes)