intouchsystems
asked on
How do I add an attachment to a Notes Memo using Applescript?
How do I add an attachment to a Notes Memo using Applescript?
I have an applescript that automatically creates and sends an email but I really need to auto add an attachment.
Mac OSX
Lotus Notes Client 6.5.1
I have an applescript that automatically creates and sends an email but I really need to auto add an attachment.
Mac OSX
Lotus Notes Client 6.5.1
ASKER
tell application "Finder"
activate
display dialog "Choose a file to attach"
set somefile to choose file with prompt "Choose a file to attach…"
set target2 to name of somefile
set path1 to POSIX path of somefile
end tell
set attach1 to target2
property ToAddress : "systems@intouchplc.com"
property CCAddress : "systems@intouchplc.com"
tell application "Notes"
set myDB to make new database with data {"", ""}
try
openmail myDB
end try
set myDoc to make new document with data {myDB}
replaceitemvalue myDoc itemname "SendTo" newvalue ToAddress
replaceitemvalue myDoc itemname "Subject" newvalue "Is there an attachment?"
replaceitemvalue myDoc itemname "Body" newvalue "Yes :-), No :-("
replaceitemvalue myDoc itemname "CopyTo" newvalue CCAddress
send myDoc without attachform
end tell
activate
display dialog "Choose a file to attach"
set somefile to choose file with prompt "Choose a file to attach…"
set target2 to name of somefile
set path1 to POSIX path of somefile
end tell
set attach1 to target2
property ToAddress : "systems@intouchplc.com"
property CCAddress : "systems@intouchplc.com"
tell application "Notes"
set myDB to make new database with data {"", ""}
try
openmail myDB
end try
set myDoc to make new document with data {myDB}
replaceitemvalue myDoc itemname "SendTo" newvalue ToAddress
replaceitemvalue myDoc itemname "Subject" newvalue "Is there an attachment?"
replaceitemvalue myDoc itemname "Body" newvalue "Yes :-), No :-("
replaceitemvalue myDoc itemname "CopyTo" newvalue CCAddress
send myDoc without attachform
end tell
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
I don't know that I actaully SOLVED the problem, but I'm pretty sure there was enough info there to get the problem solved, or to take the next round of comments deeper toward a complete soultion.
Partha similarly pointed at a long script that contained some similar functions.
Partha similarly pointed at a long script that contained some similar functions.
Show us the script you have now, then we may be able to help
cheers,
Tom