Anybody able to tell me where I am going wrong in the following:-
tell application "AppleWorks 6.2.9"
activate
try
set selectedText to selection of front do***ent
set envelope to "TechmorePB:stationary:GPEnvelope10.cwk"
-- gave up with the above and tried a choose!
set envelope to choose file
open do***ent envelope
display dialog "doc opened" buttons {"OK"} default button "OK"
with icon 1
paste
select menu item "Print…" of menu "File"
on error
display dialog "Unable to print envelope." buttons {"OK"} default
button "OK" with icon 0
end try
end tell
I cannot get the do***ent to open at all using applescript. The do***ent
GPEnvelope10.cwk is a plain AW do***ent and opens fine in AW. I am
running under Mac OS X 10.5.2 leopard.