Microsoft Office File on Shared Drive is in Use by Another User or Locked for Editing

Environment

Microsoft Office on Windows with shared network drives.

Issue

When attempting to open a Microsoft Office file from a shared network drive, an error message "file is in use" or "file is locked" appears, despite the file not being open by another user.

Resolution

To resolve the issue, follow these steps:

  1. Navigate to the folder on the shared network drive where the Microsoft Office file is located. For example, if you are trying to open S:\example.xlsx then you will want to be in the S: drive either from the Windows Explorer or from the command line.
  2. Look for a temporary file with a similar name as the document you are trying to open, but starting with a tilde (~), such as ~example.xlsx. This may be hidden by the operating system in Explorer, so if you are using Explorer then check the steps to see that these types of files can be displayed. If you are using the command line you will not need to do that.
  3. If such a file exists, it needs to be deleted via either Windows Explorer or the command line:
    • From Windows Explorer:
      1. Go to Control Panel > Appearance.
      2. Select Show Hidden.
      3. Uncheck "Hide protected operating system files (Recommended)".
      4. Delete the temporary file (~example.xlsx).
    • From the MS-DOS Command Prompt:
      1. Open the Command Prompt by clicking Start > Run, type CMD, and press Enter.
      2. Change directory to the shared drive by typing cd s: and press Enter.
      3. List all files in the directory by typing dir and press Enter.
      4. Delete the temporary file by typing del ~example.xlsx and press Enter.
  4. After deleting the temporary file, try opening the original file again.

Additional Information

Need additional information or assistance? Contact the ITS Service Center.

Print Article

Details

Article ID: 12076
Created
Wed 5/8/24 12:13 PM
Modified
Thu 5/9/24 5:00 PM