Applescript "save as" command for Excel 2008

D

dougcpa

Version: 2008
Operating System: Mac OS X 10.5 (Leopard)
Processor: Intel

I'm trying to write my first Applescript for Excel 2008 and keep getting an error. The script is a simply save as command.

Here is the script.

set theFile to "data:users:Accounting OTC:Doug:agvantage:jeexport.txt" as alias
tell application "Microsoft Excel"
tell active workbook
activate object worksheet "Sheet1"
save as worksheet "Sheet1" filename theFile file format text windows file format
end tell
end tell

When I run the script I get the error "Microsoft Excel got an error: worksheet "Sheet1" of active workbook doesn't understand the save as message."

Any ideas?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top