How to Fix Error Code 0x80070021 in Microsoft Outlook?
Summary: The Outlook error code 0x80070021 prevents users from copying or backing up their Personal Folders file (PST) file from its default location to another folder, volume, or external drive. In this blog, you will learn the reasons that can lead to the Outlook error 0x80070021 and the solutions to fix it. You can also find about an advanced PST repair tool that can extract and save mail items from inaccessible or corrupt PST files to a new PST file.
The Outlook error code 0x80070021 appears when a user tries to copy or backup the PST file associated with an email profile in Microsoft Outlook. The error message reads as follows:
“An unexpected error is keeping you from copying the file. If you continue to receive this error, you can use the error code to search for help with this problem.
Error 0x80070021: The process cannot access the file because another process has locked a portion of the file.”
The error prevents users from copying their PST file as it’s locked by either Outlook, its processes, or another application, such as an antivirus, running on the system.
Below, we’ve mentioned the reasons behind the Outlook error 0x80070021 and the solutions to fix the error.
Reasons for Error Code 0x80070021 in Outlook
There are mainly two reasons that can lead to the error code 0x80070021 in Windows Outlook.
PST File is Locked
The error code 0x80070021 may appear when the PST file you are trying to copy or backup is locked or being used by any application running in the background. It could be an antivirus scanning your system, or unified messaging services, such as Skype for Business, Lync, MS Office communicator, etc.
Hardware or Software Issues
The storage media where the PST file is currently stored may have issues with the file system that can prevent the operating system from performing a simple copy/paste operation. Similarly, issues with the operating system or other critical Windows services can also lead to similar issues, preventing you from creating PST file backup and causing the error 0x80070021.
Solutions to Resolve Outlook Error Code 0x80070021
You can apply the following solutions to troubleshoot and resolve the Microsoft Outlook error code 0x80070021.
Check and Close All Outlook Processes
Open the Task Manager to check and close all the Outlook and related processes that may have access to your Outlook data file. The steps are as follows:
- Close Outlook and press CTRL + ALT+ DEL.
- Click Task Manager > More details.
- Find all Outlook processes. You can click on the Name tab to sort the processes in alphabetical order.
- Select and click the End Process button.
- Then look for Lync and Skype for Business. Close these apps and processes as well.
- Repeat the steps until all required processes are closed.
Also, disable the antivirus tool temporarily. If a scan is running, stop it and then try to copy or move the PST file.
To disable add-ins, start Outlook in Safe Mode. The steps are as follows:
- Press Windows + R, type Outlook.exe /safe, and press the Enter key or click OK.
- Go to File > Options > Add-Ins.
- Click Go.
- Uncheck all add-ins and click OK.
- Restart Outlook normally.
Try to copy or back up the PST file to your desired location.
Perform Clean Boot
Microsoft Windows Search Email Indexer is responsible for indexing all the files and folders in your Windows system, including emails and other data. It catalogs the information, allowing you to quickly search and find results. Outlook uses Microsoft Windows Search Indexer to index all emails.
If Microsoft Windows Search Indexer is currently indexing the Outlook emails, it may prevent you from copying or moving the PST file containing all the emails and other mail items.
While you can close the Microsoft Windows Search Indexer process from Task Manager, it will quickly pop up again after a few seconds. Thus, you must disable the Microsoft Windows Search Indexer by performing a clean boot to safely copy or move the PST and prevent the error code 0x80070021.
The steps are as follows:
- Press Windows + R, type MSConfig, and click OK.
- Click Services and then selectthe Hide all Microsoft services checkbox.
- Then click the Disable all button.
- Click Startup and click open Task Manager.
- Click Startup and disable all startup items.
- Close the Task Manager and click OK in the System Configuration window.
- Restart the system.
- After the restart, try copying the PST file. The error should not appear if caused by the Windows indexing service.
Uninstall MS Office Communicator App
You can uninstall the MS Office Communicator app that may have been conflicting with the Outlook data file (PST). The app is obsolete and won’t impact the MS Office or Outlook functioning. The steps are as follows:
- Press Windows + R, type appwiz.cpl, and click OK.
- Find and select the MS Office Communicator app (if listed) and click Uninstall.
- Follow the wizard to finish the uninstallation.
- Restart the system and then try to copy or back up your PST file to your desired location.
Boot Windows in Safe Mode
You can also try the Windows Safe Mode to copy and backup the PST file. This can help avoid the error 0x80070021. The steps are as follows:
- Press the Windows key and click on the Power icon.
- While holding the Shift key and choose Restart.
- After the restart, navigate to Troubleshoot > Advanced options > See more recovery options > Startup Settings.
- Choose the Restart button. You will see the Startup Settings.
- Press the 4 key to select and boot the system in safe mode.
- Login to your system in safe mode and try to copy the PST file.
- Then restart the system normally to continue using it.
Use PST Repair Tool
If nothing worked in your case or you are still encountering the error code 0x80070021, use an Outlook PST repair tool—Stellar Repair for Outlook. The tool can scan, recover, and save all mail items with their original folder structure to a new PST file at your desired location.
You can use the tool to copy the emails, attachments, contacts, tasks, notes, calendar items, etc. from the inaccessible PST file to a healthy Outlook importable PST file or export directly to Office 365/Microsoft 365 or live Exchange mailbox.
If you are encountering the error code 0x80070021 while moving or copying the Outlook PST file from its current or default location to a different folder or drive, try closing all the background apps and processes that may have access to the PST file. If that doesn’t work, check the storage disk health and file system. There could be issues with the storage media that you must fix before you can copy or move the PST file for backup. In nothing works, use an Outlook PST repair software like Stellar Repair for Outlook. The software helps you scan and recover the mail items from PST files and save them in a new Outlook importable PST file at any location. You can also export the recovered mail items from inaccessible, faulty, corrupt, or inconsistent PST files directly to Office 365 or a live Exchange mailbox.