What's new

close all open word files execpt current one in word 2010


New Member
I often need to open a lot of word document when write my paper. So it will be troublesome when I need to colse these word files execpt my paper.

I have to close them all by click "Close all windows" and then reopen my paper. Is there any other way to close all open word files execpt current one directly? That will help a lot. Thanks.


Super Moderator
Staff member
Welcome to the forum.

I'm unaware of any method of doing this. Is there any reason you can't install something like openoffice (or office 365 word app) and using that for the single file, and then open all the rest with desktop office?


Active Member
What I do is just go to the task bar, hit the right mouse button on Word, and then hit the X on each document I want to close. That goes pretty quickly. I don't believe there is a function to do what you are asking on any platform I've used.


New Member
You can use VBA codes to do that. Here is a macro I find, you can try

Sub CloseAllDocsExceptCurrentOne()
  Dim objDoc As Document
  Dim objDocumentsToBeClosed As New Collection
  Dim nCount As Integer
  nCount = Application.Documents.Count
  For nIndex = 1 To nCount
    Set objDoc = Application.Documents.Item(nIndex)
    If objDoc.FullName <> ActiveDocument.FullName Then
      objDocumentsToBeClosed.Add objDoc
      Exit For
    End If
  Next nIndex
  For Each objDoc In objDocumentsToBeClosed
    objDoc.Close SaveChanges:=wdSaveChanges
  Next objDoc
End Sub
More ways you can see at

5 Smart Ways to Close Multiple Open Documents except the Current One in Your Word - Data Recovery Blog

Hope it works

Members online

No members online now.