logo
search
Permission & Access Issues

Fix Cannot Delete File Because It Is Open in Another Location in Office

Algirdas JasaitisAlgirdas Jasaitis Sep 25, 2026 871 views

Question details

The user is unable to delete a file stored in OneDrive or SharePoint due to a system prompt stating the file is open in another location or program.

How to Fix 'Cannot Delete a File Because It Is Open in Another Location'
Product
OneDrive, SharePoint, Microsoft Office
Device & OS
not provided
Scenario
Attempting to delete a document from cloud storage or a local synced folder.
Observed behavior
The system prevents file deletion and displays an error warning that the document is locked, typically caused by multiple active browser tabs or background desktop applications.
Before you start

Check your computer's taskbar and open browser windows to verify if the document is visibly open anywhere before attempting to force-close background processes.

Solution 1Recommended

Close All Active Instances of the Document

OneDrive and SharePoint treat files open in multiple tabs or apps as having multiple editors. Closing all instances removes the file lock.

This error most commonly occurs when a single document is simultaneously open in a web browser and a desktop application like Word or Excel.

1
Check browser tabs

Look through all your active browser windows and completely close any SharePoint or OneDrive tabs that are displaying the document.

2
Close desktop applications

Ensure the desktop versions of Word, Excel, or PowerPoint are completely closed. Look at your taskbar to verify no document windows remain open.

3
Verify co-authors

If the file is shared on SharePoint, verify that no other users are currently viewing or editing the document.

4
Attempt deletion again

Return to your OneDrive or SharePoint folder, select the file, and press the Delete key.

Close All Active Instances of the Document
Clear File Locks: Closing all instances ensures the server registers that active editing sessions have ended, allowing you to modify or delete the file.
Free Microsoft Office alternative

Avoid File Locking Issues with WPS Office

Microsoft Office and OneDrive can sometimes lock files in the background, causing frustrating deletion errors. Switch to WPS Office for a lightweight, fast, and free alternative that handles all your document needs without heavy, intrusive background processes.

  1. 1. Download the installer: Visit the official WPS Office website and click the 'Free Download' button.
  2. 2. Install the software: Run the downloaded executable file and follow the quick installation prompts on your screen.
  3. 3. Open existing files easily: Right-click any of your existing Microsoft Office files and choose 'Open with WPS Office' to edit seamlessly without lock issues.
Fully compatible with Microsoft Word, Excel, and PowerPoint file formats.Lightweight software architecture minimizes background file-locking errors.Built-in seamless cloud sync that prevents accidental file conflicts.Free to use with a familiar, easy-to-learn user interface.
microsoft office alternative - wps office

Frequently Asked Questions

Does the File Explorer Preview Pane cause files to be locked?

Yes, having the Preview Pane enabled in Windows File Explorer can temporarily lock a document because the system reads it to generate the visual preview. Try disabling the Preview Pane under the View tab and deleting the file again.

Why does my file stay locked even after I close the browser?

Sometimes background processes take a few minutes to communicate with SharePoint or OneDrive servers to signal that the file is closed. Waiting 5 to 10 minutes often resolves the issue automatically.

Can I use Task Manager to force close the file?

Yes, if the file is locked by a frozen or hidden desktop application, you can press Ctrl + Shift + Esc to open Task Manager, locate the Word or Excel process in the list, and click 'End task' to forcefully release the file lock.

How do I know if someone else has the SharePoint file open?

In SharePoint or OneDrive online, you can check the 'Modified By' column, or open the document in your browser to see if there are other active users present (indicated by colored initials in the top-right corner of the document editor).