TechBuzzPro

Word Close All Except Current Document?

· 5 min read · Apps & Browsers

In this article
  1. What Word Actually Offers
  2. Why You Might Want This
  3. How to Close All Except Current (Step-by-Step)
  4. What About Word on Mac and Word for the Web?
  5. Common Pitfalls and How to Avoid Them
  6. Alternatives to Macros
  7. Frequently Asked Questions

In Microsoft Word, there is no single built-in command that closes all open documents except the current one, but you can achieve the same result by holding the Shift key while clicking File > Close (or the X on the title bar) to close the current document, then manually closing the others—or by using a simple macro to close all others automatically. This article explains the built-in options, the macro method, and the practical differences between Word on Windows, Mac, and the web.

What Word Actually Offers

Word’s interface has no “Close All Except This” button. The closest built-in feature is Close (File > Close, or Ctrl+W), which closes only the active document. If you have multiple documents open, you must close each one individually. However, there is a hidden shortcut: holding Shift while clicking File changes the Close command to Close All, which closes every open document at once. That closes all, not all except the current one, so it doesn’t solve the “except current” problem directly.

For a true “close all except current” action, you need to use a macro—a small piece of VBA code that you can run with a single click or keyboard shortcut. This is the only way to get exactly the behavior described in the question.

Why You Might Want This

People often accumulate many Word windows while working on a project: a main report, several reference files, a draft, and a version with tracked changes. Closing them one by one is tedious, and closing all by mistake loses unsaved work. A “close all except current” command lets you keep the document you are actively editing while cleaning up the rest, reducing clutter and memory usage without risking the loss of the file you are focusing on.

It also helps when you have many files open and want to reduce the number of windows in the taskbar or the Alt+Tab list. Keeping only the current document makes it easier to switch between applications and reduces the chance of accidentally editing the wrong file.

How to Close All Except Current (Step-by-Step)

Here is the most reliable method using a macro in Word for Windows. The same steps work in Word for Mac with minor differences in the menu names.

  1. Press Alt+F11 to open the Visual Basic for Applications (VBA) editor.
  2. In the left pane, expand Normal and double-click ThisDocument (or insert a new module via Insert > Module).
  3. Paste the following code:
Sub CloseAllExceptCurrent()
    Dim doc As Document
    For Each doc In Application.Documents
        If doc.Name <> ActiveDocument.Name Then
            doc.Close SaveChanges:=wdDoNotSaveChanges
        End If
    Next doc
End Sub
  1. Close the VBA editor.
  2. Press Alt+F8, select CloseAllExceptCurrent, and click Run.

The code loops through every open document and closes any that are not the active one. The wdDoNotSaveChanges constant means it will not prompt to save changes—use wdSaveChanges if you want to save automatically, or wdPromptToSaveChanges to ask each time. Be careful: the code above discards unsaved changes in the other documents.

What About Word on Mac and Word for the Web?

On Word for Mac, the VBA editor is opened with Tools > Macro > Visual Basic Editor (or Option+F11). The same code works, but you may need to enable the Developer tab first. On Word for the Web (the browser version), macros are not supported at all, so there is no way to automate this. You must close each tab manually. The web version also does not have the Shift+Close All shortcut, so the only option is to click the X on each browser tab.

Common Pitfalls and How to Avoid Them

  • Accidentally closing the current document: The macro checks doc.Name <> ActiveDocument.Name, so it will never close the active document. However, if you have two documents with the same name (from different folders), the comparison may fail. In that case, use doc.FullName instead of doc.Name.
  • Losing unsaved changes: The default code uses wdDoNotSaveChanges, which discards changes. Always save important files before running the macro, or change the constant to wdSaveChanges.
  • Macro security settings: Word may block macros by default. If you get a security warning, you can enable macros for the session, or add the file to your trusted locations. This is a security measure, so do not disable it permanently unless you trust the source.
  • Running the macro from the wrong document: The macro uses ActiveDocument, so make sure the document you want to keep is the one currently in focus before running it.

Alternatives to Macros

If you prefer not to use VBA, there are a few manual approaches:

  • Close all and reopen the one you need: Use Shift+File > Close All, then reopen the file from the Recent list. This is simple but loses unsaved changes in other documents.
  • Use the taskbar: Right-click the Word icon in the taskbar and choose “Close all windows” (Windows 10/11). This closes all, not except current, so it is not a direct alternative.
  • Use a third-party utility: Some window management tools can close all windows of an application except the active one, but they are not specific to Word and may not handle unsaved changes safely.

The macro method is the only one that gives you the exact “except current” behavior with a single action.

Frequently Asked Questions

Is there a keyboard shortcut for “close all except current”?

No, Word does not have a built-in keyboard shortcut for this. You can assign a custom shortcut to the macro by going to File > Options > Customize Ribbon > Keyboard Shortcuts, selecting “Macros,” and assigning a key combination like Ctrl+Shift+W.

Will the macro close documents that have unsaved changes?

Only if you use wdDoNotSaveChanges (as in the example). If you want to save them, change that constant to wdSaveChanges. If you want to be asked each time, use wdPromptToSaveChanges.

Does this work in Word for Mac?

Yes, the same VBA code works in Word for Mac, but you need to open the VBA editor via Tools > Macro > Visual Basic Editor. The keyboard shortcuts are different (Option+F11 instead of Alt+F11).

Can I use this in Word for the Web?

No, the web version does not support macros or VBA. You must close tabs manually.

What if I have multiple windows of the same document?

If you have the same document open in multiple windows (via View > New Window), the macro will close the other windows, but it may also close the document itself if the active window is not the one with the original document. To avoid this, use doc.FullName and compare with ActiveDocument.FullName.

Is it safe to run this macro?

Yes, if you understand what it does. It only closes other open Word documents. However, be aware that it can discard unsaved changes if you use the default constant. Always save your work first.