Word, Excel, PowerPoint Error: file is locked for editing

Whenever you save a Microsoft Office document (Word, Excel or PowerPoint) to your local hard drive or to a fileserver, an associated temporary file is created to the same location as your MS Office document. However, you will not be able to see the associated temporary file from within the Finder because it is a hidden file.

The associated temporary file remains present in the same location as your MS document until you close your document.

The purpose of this associated temporary file is to lockout editing of your MS document to other users while you have it open. The associated temporary file also stores the name of the person who currently has the MS document open, and if another user attempts to open the document, it displays a warning dialogue (see below) to inform them that, “The file is locked for editing”.

microsoft files locked for editing

You can open the document as Read-Only, but you will not be able to edit the document. This is by-design and prevents other users overwriting your work, or even worse causing document corruption.

To clarify, if a user has opened an existing or created an Excel document entitled Example.xlsx, while this document is open there will be an associated temporary file entitled ~$Example.xlsx in the same location as your Excel document. The temporary file is named the same as the Excel document but prefixed with ~$ symbols.

The problem with using an associated temporary file is that if the MS Office application crashes then it is likely that the associated temporary file remains and locks the MS Office document.

Typically this problem is identified when another user attempts to open the MS document, and their MS Office application displays the warning dialogue “The file is locked for editing”, and this is despite anyone else on the same network having the MS document open.

The resolution for this document locking problem would be as follows:

  • Ask the person whose name appears in the warning dialogue, to open the MS document, make a small change to the MS document, File > Save the document, and then close the document. This should then clear the associated temporary file and, therefore, unlock the MS document.
  • Open the MS document as Read-Only, File > Save As, and save the MS document with a different file name.
  • Using the application Terminal (Applications/Utilities), navigate to where the MS document is saved, list all files including hidden files (in Terminal type ls -a), identify the MS documents associated temporary file (remember it will be the same name as your MS document, but prefixed with a ~$), and remove the associated temporary file by using a Terminal remove file command (rm <name of file>). Note: Use the rm command within the Terminal with caution as the removed file is deleted immediately and not moved to Trash.
  • Alternative to using the Terminal app would be to download one of the many free utilities to show/hide hidden files. There are many of these free apps but one I have used is InVisible which when opened is accessible very quickly from your Finders top menubar. It makes toggling between visible/invisible very quick and user friendly.

This MS document locked file issue is a fairly common occurrence so I hope that this article goes some way to explaining how it happens and that the resolutions outlined above help resolve issues that you may experience.


While the author has taken care to provide our readers with accurate information, please use your discretion before acting upon information based on the blog post. Amsys will not compensate you in any way whatsoever if you ever happen to suffer a loss/inconvenience/damage because of/while making use of information in this blog.

6 Replies to "Word, Excel, PowerPoint Error: file is locked for editing"

  • scyren

    Unfortunately, mine says it’s being edited by me. I logged off of the file with no problem the day before and rebooted my computer. I can’t delete that file because it says it’s in use when it’s not so I can’t get to my file. Renaming it would require that I inform the whole company and besides, I don’t want to stray from the naming convention.

  • Schenker

    Unfortunately, I too am facing the same problem as sycren. I’ve tried deleting the temp file with the ‘$’ prefix. Now it is locked by ‘another user’. Even worse, now I don’t know who the ‘another user’ is as there are a number of people who access this file on a shared server.

    It seems to be locked not only for me but also for others. No one can save any changes to the file as it is “Read Only” now.


  • I am the only person who uses my computer. My computer tells me I can’t open several files because they are locked for editing by me, but it won’t let me edit them! I really do not have the computer knowledge to navigate to strange places and do stuff. Is there a simple way of telling the computer that the files are mine and that I am the person who wrote them and wants to amend them?

  • Hi had this problem when working on a MS Word mail merge where the source data file was an Excel file. As I hit a snag with the mail merge I quit Word midway through. Subsequently, opening the Excel source file gave the locked by another user dialogue box. I went back into Word and reversed the step by step mail merge process, closed word and all good.

  • Hi there,

    I see here it explains how to fix these errors, however how do you set this message up to begin with? Currently, I am using a shared team Excel doc, and we keep overwriting each other’s work because this message is not coming up and we don’t know somebody is already in it, editing. I thought it was supposed to be automatic, but we’re not getting it. We are accessing this doc through Dropbox – I’m not sure if that makes a difference?

    Any help would be greatly appreciated!

Leave a Reply

Your email address will not be published. Required fields are marked *