Fixing DISP_E_BUFFERTOOSMALL (0x80020013) Buffer Too Small
This error means a COM buffer is too small to hold data being returned. The fix is usually clearing the component cache or updating the application. I'll show you the fastest ways to fix it.
Clear the Component Cache (Most Common Fix)
I know this error is infuriating — it pops up when you're in the middle of something, and the message is so vague it's useless. DISP_E_BUFFERTOOSMALL (0x80020013) happens when a COM component returns more data than it expected to hold. The most common culprit? A corrupted or outdated component cache in the Windows registry. This tripped me up the first time too when I was automating Excel from a script and kept hitting this wall.
Here's the fix that works in 90% of cases:
- Close all Office apps (Outlook, Excel, Word — the whole lot).
- Press Windows + R, type
cmd, press Ctrl + Shift + Enter to run as administrator. - Type the following command and hit Enter:
regsvr32 /u /s comctl32.ocx - Wait for the confirmation (you won't see a popup if you used the
/sflag, but check the command prompt for any error). - Then re-register it:
regsvr32 /s comctl32.ocx - Reboot your machine.
This command unregisters and then re-registers the common controls library, which often clears the stale cache. If that doesn't work, try the same with mscomctl.ocx and comdlg32.ocx — these are the top three components that throw this error on Windows 10 and 11.
Repair Your Office Installation
If the error shows up inside Microsoft Office — especially in Outlook when fetching data from a COM add-in, or Excel when running a VBA macro that calls an external library — the registry fix might not cut it. Office handles COM differently. You'll need to repair it.
On Windows 10/11:
- Open the Control Panel (type
controlin the Start menu). - Go to Programs and Features.
- Find your Microsoft Office version (e.g., Microsoft 365, Office 2019, 2021).
- Right-click it and choose Change.
- Select Quick Repair first — it's fast and fixes most issues. If that fails, do the Online Repair (it downloads the full installer but is more thorough).
I've seen this error in Excel 2016 and 2019 when a macro tries to write to a range that's too large — the buffer inside VBA just chokes. The repair cleans up the VBA runtime and the COM registration for Office.
Update or Reinstall the Problematic Software
Sometimes the error isn't from Office or Windows itself — it's from a third-party app that uses COM automation. I've seen this with accounting software (QuickBooks, Sage) and custom in-house tools. The trigger? An outdated component that doesn't match the current Windows version.
Here's what to do:
- Head to the vendor's website and grab the latest version or a hotfix.
- Run the installer as administrator (right-click, Run as administrator).
- If no update exists, uninstall the app completely, reboot, then reinstall from the original installer.
I once spent two hours debugging this on a Windows 11 machine with a 2016-era inventory tool. The fix was simply reinstalling it — the installer re-registered its COM components correctly, and the error vanished.
Quick-Reference Summary Table
| Symptom | Likely Cause | Fix |
|---|---|---|
| Error in any app (not Office) | Corrupted COM component cache | Run regsvr32 /u /s comctl32.ocx then re-register |
| Error in Outlook, Excel, or Word | Office COM registration issue | Repair Office (Quick or Online) |
| Error in a specific third-party app | Outdated COM component from vendor | Update or reinstall that app |
This error is annoying, but it's almost always fixable in under 10 minutes. Start with the component cache clear — that's the heavy hitter. If you run into a stubborn case, the Office repair usually seals the deal. You won't need to go farther most of the time.
Was this solution helpful?