Take the 2-minute tour ×
Ask Different is a question and answer site for power users of Apple hardware and software. It's 100% free, no registration required.

When I'm working on MS Office 2011, when I close a document, spreadsheet, presentation, etc., the application stays open. This is confusing (to me anyway) and I find myself having to explicitly quit these apps all the time (to get them out of the way).

Is there a way to quit an app when the last item is closed?

Thanks in advance!

share|improve this question
add comment

3 Answers

up vote 4 down vote accepted

Its an implementation detail that the developer has to implement, in your example case for Office its Microsoft.

Here is the Cocoa Objective-C code that allows the developer to implement this feature:

- (BOOL)applicationShouldTerminateAfterLastWindowClosed:(NSApplication *)sender
{
   return YES;
}

What your observing is normal behavior on almost all Applications on OS X and even the classic Mac OS. Its one of those thing you should get use to on the Mac. However, these days you are in luck that things are changing in your favor in Lion and probably later as OS X gains more features from iOS. As referenced in Lion Is a Quitter.

Lion will quit your running applications behind your back if it decides it needs the resources, and if you don’t appear to be using them. The heuristic for determining whether an application is “in use” is very conservative: it must not be the active application, it must have no visible, non-minimized windows — and, of course, it must explicitly support Automatic Termination.

Clearly it looks like that version of Microsoft Office does not support Automatic Termination yet, but it may be coming.

So for now the most you can do is check the programs preferences for options relating to quitting the application when it has no more windows open. Also I encourage you to give Microsoft and or any developer of Apps feedback that you would like see "quitting on last window closed" as a preference option or suggest they add support for Automatic Termination to their products.

Until then just remember to use +Q when you are done with those applications that do not automatically quit when you close all its windows.

share|improve this answer
    
Thanks for the extra detail. Basically was using command+q key combo. –  Rich Mar 7 '12 at 15:09
add comment

I don't think that's a way for that. You can use Command + Q to quit the program, or click on the name of the app on the Menubar and select Quit.

share|improve this answer
add comment

When I started using a Mac, I found that too. Some applications quit after the last window is closed and some (most, in my experience) don't.

Doesn't really answer your question, but I just got used to using + Q which will quit the application. That way if you have any open, unsaved documents it will prompt you to save them, then quit.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.