We previously used the following applescript code to create a new memo in Notes 6.5:
tell application “Notes”
activate
activate
set myDB to database with data {"", ""}
try
openmail myDB
end try
set myDoc to make new document with data {myDB}
replaceitemvalue myDoc itemname "SendTo" newvalue "andy.goodall@intouchplc.com"
replaceitemvalue myDoc itemname "CopyTo" newvalue "andy.goodall@intouchplc.com"
replaceitemvalue myDoc itemname "Subject" newvalue "test subjest"
replaceitemvalue myDoc itemname "Body" newvalue "Body1"
savedocument myDoc force 0 makeresponse 0
send myDoc without attachform
end tell
This code works fine in Notes 6.5 but not at all in Notes 7 on the Mac, has anyone any ideas why or any code that may help? It seems to get stuck at the ‘openmail myDB’ section
Subject: Applescript and Notes 7 Mac - No longer works??
I’m no expert on scripting Notes, but can you isolate the problem to the openmail command? For instance can you open a mail manually and get the rest of the script to work? It always helps to nail down the offending command and then search for a work-around.