WD: Word Doesn't Display Each Open Document When Exiting

ID: Q139704


The information in this article applies to:
  • Microsoft Word for the Macintosh, versions 6.0, 6.0.1, 6.0.1a
  • Microsoft Word 98 Macintosh Edition
  • Microsoft Word for Windows, versions 6.0, 6.0a, 6.0c
  • Microsoft Word for Windows NT, version 6.0
  • Microsoft Word for Windows 95, versions 7.0, 7.0a


SYMPTOMS

When you have multiple documents open and you choose Exit (Windows) or Quit (Macintosh) on the File menu, Word displays the most recently opened document as you are prompted to save any modified files. This functionality is different from earlier versions of Word, which displayed each document when you were prompted to save it.


CAUSE

By design, Word displays the last document open and halts other application processes when you choose Exit (Windows) or Quit (Macintosh) on the File menu.


WORKAROUND

To display each document as Word prompts you to save it, use one of the following methods:

Method 1: Create a Macro

Microsoft provides programming examples for illustration only, without warranty either expressed or implied, including, but not limited to, the implied warranties of merchantability and/or fitness for a particular purpose. This article assumes that you are familiar with the programming language being demonstrated and the tools used to create and debug procedures. Microsoft support professionals can help explain the functionality of a particular procedure, but they will not modify these examples to provide added functionality or construct procedures to meet your specific needs. If you have limited programming experience, you may want to contact the Microsoft fee-based consulting line at (800) 936-5200. For more information about the support options available from Microsoft, please see the following page on the World Wide Web:
http://www.microsoft.com/supportnet/refguide/
Create the following macro and name it FileExit (Windows) or FileQuit (Macintosh). Word will use this macro in place of the original FileExit or FileQuit command.

Word 98 Macintosh Edition:

   Sub FileExit()
   Dim X as Document
      For Each X In Documents
         X.Activate
         On Error Resume Next
         X.Close
      Next
   End Sub 
Word 95 and Earlier Versions:

Sub Main
      FileCloseAll
      FileExit  (use FileQuit on the Macintosh)
   End Sub 

Method 2: Use the ExitAll macro

NOTE: Word 98 Macintosh Edition does not include this macro. Only Word 6.0 (Windows and Macintosh) and Word for Windows 95 (Word 7.0) included this macro.

This macro is stored in the following templates. These templates are installed when you choose a Complete/Custom installation of Word. Word Setup places this template in the Macros subdirectory (folder) of your Word program directory (folder).

   Macro60.dot            Windows/Windows NT
   Macros7.dot            Windows 95
   Word 6.0 Macros        Macintosh 
When you run the ExitAll Macro, Word lists each document that is open in a dialog box and prompts you to choose which document to save. Word displays each document as it prompts you to save it.

Method 3: Use the SHIFT key

Hold down the SHIFT key, click File, and then click Close All. When all documents are saved and closed, click Exit (Windows) or Quit (Macintosh) on the File menu.

Method 4: Use the FileCloseAll command

Customize your File menu by adding the FileCloseAll command to the File menu. When all documents are saved and closed, click Exit (Windows) or Quit (Macintosh) on the File menu.

Additional query words: file close all closeall filecloseall quit exit save prompt documents display view

Keywords : kbmacro kbui kbdtacode wordnt kbmacroexample word8 macword98 winword ntword macword word6 word7 word95
Version : MACINTOSH:6.0,6.0.1,6.0.1a,98; WINDOWS:6.0,6.0a,6.0c,7.0,7.0a; winnt:6.0
Platform : MACINTOSH WINDOWS winnt
Issue type : kbprb


Last Reviewed: October 13, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.