Microsoft Outlook is among the most widely used email clients for both personal and professional use, offering integrated calendar and task management features. However, users occasionally encounter errors that affect productivity and communication. One such frustrating issue is the infamous Error Code 0x80070021. If you’ve seen this error pop up while trying to copy or move Outlook data files, you’re not alone. Thankfully, there are practical solutions to fix it.
Contents
TL;DR
This error usually occurs when a file is already in use by another process or if certain Outlook-related services are interfering with file operations. To resolve it, you can disable In-Use services like Windows Search, stop specific background processes, or use Safe Mode. These steps will allow you to successfully move or copy your Outlook data files without triggering the error.
What is Outlook Error 0x80070021?
Error code 0x80070021 typically appears when attempting to copy, move, or manipulate a personal storage table file (PST) or OST file used by Outlook. The error message often states something like: “The process cannot access the file because another process has locked a portion of the file.”
This can happen due to a number of reasons:
- The PST file is actively being used by Outlook.
- Windows Search or another indexing service is accessing the file.
- Background apps like Office Add-ins or sync services are locking the file.
Common Scenarios Where You Might See This Error
Understanding when and why this happens can help resolve it faster. Here are a few common scenarios:
- When backing up your Outlook data files manually.
- Copying PST files to a new location as part of a migration.
- Syncing files with OneDrive or other cloud storage platforms.
- Accessing emails while a background indexing process is still running.
In any case, the root cause is typically that another process is using or has locked the file, preventing changes or movement.
Steps to Fix Outlook Error 0x80070021
1. Close Microsoft Outlook Completely
This may seem obvious, but many users minimize or close the Outlook window without ending the background processes. To fully close Outlook:
- Press Ctrl + Shift + Esc to open the Task Manager.
- Search for OUTLOOK.EXE in the list of running processes.
- Right-click on it and click End Task.
2. Disable Windows Search Temporarily
Windows Search is often a culprit because it indexes PST files to enable fast searching. You can temporarily disable it to eliminate file locking issues.
- Press Win + R and type
services.msc. - Scroll to find Windows Search.
- Right-click and choose Stop.
Once changes are complete, remember to re-enable the service using the same steps and clicking Start.
3. Boot into Safe Mode
Running Windows in Safe Mode ensures that minimal background processes are active, which can help you move or copy your PST file more easily.
To enter Safe Mode:
- Click Start, then select Settings > Update & Security > Recovery.
- Under Advanced startup, click Restart now.
- Once in the boot options menu, go to Troubleshoot > Advanced options > Startup Settings.
- Click Restart again, then press 4 to start in Safe Mode.
Once booted into Safe Mode, try your file operation again. This often works since Safe Mode disables many non-critical services.
4. Disable Add-Ins in Outlook
Some add-ins, especially those dealing with synchronization or backup, can lock your PST file. To check and disable them:
- Open Outlook.
- Click File > Options > Add-ins.
- Click Go next to COM Add-ins.
- Uncheck all unnecessary add-ins and restart Outlook.
If your file operations succeed after doing this, you’ve found the culprit.
5. Turn Off Syncing Services
Cloud sync services like OneDrive or Dropbox can also contribute by syncing your PST files in real time. Temporarily disabling syncing can prevent file locks.
For OneDrive:
- Click the OneDrive icon in your taskbar.
- Click the gear icon and choose Pause syncing.
- Select a time interval (e.g., 1 hour).
After you have completed the file transfer or copying operation, remember to re-enable syncing.
6. Use the Command Prompt to Copy the File
Sometimes, the graphical interface won’t let you bypass file locks, but the Command Prompt might. Try copying the file through CMD:
- Press Win + R, type
cmd, right-click and choose Run as administrator. - Use a command like:
copy "C:\Users\YourName\Documents\Outlook Files\yourfile.pst" "D:\Backup"
This method occasionally bypasses file locking imposed by Windows GUI processes.
7. Reboot and Try Again
If none of the above methods work, a good old-fashioned reboot can sometimes clear out any stuck background processes that may be causing the issue.
Best Practices to Avoid This Error in the Future
You can reduce the chances of facing Error 0x80070021 again by implementing these best practices:
- Always close Outlook completely before working with PST files.
- Keep add-ins to a minimum, and only install trusted ones.
- Schedule backups during off-hours when Outlook and syncing services are not running.
- Use Outlook’s built-in export tools instead of manual copying when possible.
When to Seek Professional Help
If the error persists after trying all these steps, there could be deeper system or file-level issues at play. Consider:
- Running the System File Checker with
sfc /scannowin CMD. - Repairing Office installation through the Control Panel.
- Contacting Microsoft Support or IT services if you’re in a corporate environment.
In rare cases, persistent locking may point to malware or faulty hardware, in which case a deeper diagnostic would be necessary.
Conclusion
The Error Code 0x80070021 in Microsoft Outlook can feel like a roadblock, but it’s usually a result of temporary conflicts with background services and open applications. By methodically closing processes and taking control of your environment—whether through Safe Mode, disabling Windows Search, or tweaking Outlook settings—you can resolve this error and get back to work.
Stay proactive with routine Outlook maintenance and backup procedures to reduce the chances of the error reappearing in the future.
