Microsoft KB Archive/139704

From BetaArchive Wiki

Article ID: 139704

Article Last Modified on 11/23/2006



APPLIES TO

  • Microsoft Word 6.0 for Macintosh
  • Microsoft Word 6.01 for Macintosh
  • Microsoft Word 6.01 for Macintosh
  • Microsoft Word 98 for Macintosh
  • Microsoft Word 6.0 Standard Edition
  • Microsoft Word 6.0a
  • Microsoft Word 6.0c
  • Microsoft Word 6.0 Standard Edition
  • Microsoft Word 95 Standard Edition
  • Microsoft Word 95a



This article was previously published under Q139704

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 a Microsoft Certified Partner or the Microsoft fee-based consulting line at (800) 936-5200. For more information about Microsoft Certified Partners, please visit the following Microsoft Web site:

For more information about the support options that are available and about how to contact Microsoft, visit the following Microsoft Web site:

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 kbmacroexample kbui kbprb kbdtacode KB139704