0

I'm trying to quit Excel via AppleScript

tell application "Microsoft Excel"
quit
end tell

Unfortunately, when I have a new spreadsheet opened, run the script and select "Do not save" then Excel does close but after a while Automator prompts a Syntax error stating AppleEvent caused a timeout.

Is there a better way to quit Excel avoiding this error?

Thank you!

1
  • If you doing this in automator, would the quit excel action not suffice?
    – Mockman
    Commented Aug 1, 2022 at 7:36

1 Answer 1

1

I think this small adjustment will avoid any timing out errors.

tell application "Microsoft Excel" to quit saving no
1
  • Thank you! However, I actually do want to see the prompt which asks me if I want to save progress.
    – Cerd
    Commented Jun 28, 2022 at 15:54

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .