Outlook Error 0x80040126: How to Fix Corrupted Outlook Message Store
🔍 WiseChecker

Outlook Error 0x80040126: How to Fix Corrupted Outlook Message Store

You see Outlook error 0x80040126 when trying to send or receive email. This error indicates a problem with your Outlook data file, often called the message store. The data file has become corrupted or is in an inconsistent state. This article provides the steps to repair the file and restore your email access.

Key Takeaways: Fixing Error 0x80040126

  • Inbox Repair Tool (scanpst.exe): Scans and repairs the corrupted Outlook Data File (.pst or .ost) that causes this error.
  • Control Panel > Mail > Data Files: Lets you remove and recreate your Outlook profile, which rebuilds the data store.
  • File > Account Settings > Account Settings > Data Files: Shows the location of your data file for manual backup before repair.

Why the Outlook Message Store Becomes Corrupted

Error 0x80040126 is a MAPI_E_UNKNOWN_CPID error. It means Outlook cannot correctly access your message store due to file corruption. This corruption typically happens when the Outlook process is interrupted. A sudden computer shutdown, an Outlook crash, or a storage drive error can damage the data file. Large data files, especially those approaching the old 2GB PST file limit, are more prone to this issue. The corruption affects the internal index that Outlook uses to manage your emails, calendar items, and contacts.

The primary data files are PST files for POP, IMAP, and some Microsoft 365 accounts, and OST files for Exchange and Microsoft 365 accounts using Cached Exchange Mode. The OST file is an offline copy of your mailbox stored on the server. Corruption in either file type triggers this error. The fix involves using a dedicated Microsoft tool to scan and repair the file structure.

Steps to Repair the Outlook Data File

First, close Outlook completely. Check the Task Manager to ensure the outlook.exe process is not running. It is wise to locate and make a copy of your data file before starting the repair. You can find its path in Outlook via File > Account Settings > Account Settings, then go to the Data Files tab.

  1. Locate the Inbox Repair Tool
    The tool, scanpst.exe, is installed with Outlook. Its location varies by version and bitness. Common paths include C:\Program Files\Microsoft Office\root\Office16 for Microsoft 365 or C:\Program Files (x86)\Microsoft Office\Office14 for older 32-bit versions. Use Windows Search to find scanpst.exe.
  2. Run the Tool and Select Your File
    Double-click scanpst.exe to open it. Click the Browse button to navigate to your Outlook Data File. The default location is often C:\Users\[YourUsername]\AppData\Local\Microsoft\Outlook. Select your .pst or .ost file and click Start.
  3. Begin the Scan and Start Repair
    The tool will analyze the file. This may take several minutes for large files. When the scan finishes, if errors are found, the Repair button will be enabled. Click Repair to begin the correction process. The tool creates a backup copy of the original file, typically named filename.bak in the same folder.
  4. Reopen Outlook and Test
    After the repair completes, close the Inbox Repair Tool. Open Outlook again. Try to send a test email and check if you can receive new messages. The error should now be resolved.

Alternative Method: Create a New Outlook Profile

If the Inbox Repair Tool does not resolve error 0x80040126, the corruption may be too severe or linked to your profile configuration. Creating a new profile is an effective alternative.

  1. Open the Mail Setup Control Panel
    Close Outlook. Press Windows Key + R, type control, and press Enter. In the Control Panel, search for Mail and open the Mail (Microsoft Outlook) setup dialog. Alternatively, type “mail” in the Windows 11 search bar and select Mail (Microsoft Outlook).
  2. Access Profile Settings
    In the Mail Setup window, click Show Profiles. Select your current profile and click Remove. Confirm the deletion. Do not worry, this removes the profile settings, not your email account data from the server.
  3. Add a New Profile and Account
    Click Add. Enter a name for the new profile, like Outlook2024, and click OK. The Add Account wizard will start. Enter your email address and follow the prompts to reconfigure your account. Outlook will create a fresh, uncorrupted data file.

If the Standard Repair Steps Do Not Work

Outlook Still Shows Error 0x80040126 After Running Scanpst

The original data file may be beyond repair. In this case, you must start with a new data file. For Exchange or Microsoft 365 accounts, you can delete the OST file. Close Outlook, navigate to its location via File Explorer, delete the .ost file, and restart Outlook. It will download a fresh copy from the server. For POP/IMAP accounts using a PST, you may need to create a new PST file and set it as the default, then move old items from the backup file created by scanpst.

Error Occurs Only with a Specific Microsoft 365 Account

The issue might be with your account’s connection settings. Go to File > Account Settings > Account Settings. Select your account and click Change. Verify the server settings are correct. For Microsoft 365, ensure the account type is Microsoft Exchange. Try temporarily turning off Cached Exchange Mode, restarting Outlook, and then re-enabling it to force a new OST file download.

You Cannot Find the Scanpst.exe Tool

The tool may not be installed if you chose a minimal Outlook installation. You can run a repair on your Microsoft Office installation via Windows Settings > Apps > Installed apps. Find Microsoft Office, click the three-dot menu, select Modify, and choose Online Repair. This will restore missing components like scanpst.exe.

Data File Repair Methods Compared

Item Inbox Repair Tool (scanpst.exe) Creating a New Outlook Profile
Primary Use Fixes logical corruption within the PST/OST file structure Resets all Outlook configuration and creates a new data file
Data Retention Repairs the existing file, attempts to keep all data Downloads fresh data from server; local cached items may be lost
Best For Corrupted files where the original data is critical Severe corruption or when the tool fails, Exchange/365 accounts
Complexity Medium, requires locating and running a separate tool Low, performed through the Windows Control Panel
Time Required Long, depends on file size and corruption level Short to medium, depends on mailbox size and download speed

You can now resolve the 0x80040126 error by repairing your Outlook data file. Use the Inbox Repair Tool for most corruption issues. If that fails, create a new Outlook profile to start fresh. For ongoing stability, avoid forcing Outlook to close and ensure your computer has a stable power supply. An advanced tip is to periodically archive old items to a separate PST file to keep your primary data file small and less prone to corruption.