OLE_E_NOSTORAGE (0X80040012) Fix: Object storage error
This error happens when an OLE object (like an embedded Excel sheet) can't find its storage location. Real trigger: corrupt temp files or broken OLE registration.
When this error hits
You're working in a Microsoft Office document — say, an Excel chart embedded in a Word document or an Outlook email with an OLE object. You double-click to edit it, and instead of opening the object, you get:
OLE_E_NOSTORAGE (0X80040012)
Not able to perform the operation because object is not given storage yet
This also shows up in older apps like Visual Basic 6 or custom COM programs that try to interact with OLE objects. I've seen it most often after a Windows update that resets some COM registrations, or after cleaning temp files aggressively with CCleaner or Disk Cleanup.
What's actually happening here
OLE (Object Linking and Embedding) works by storing object data in an IStorage interface — basically a virtual file system inside the COM layer. When your app calls IOleObject::SetClientSite, it tells the object where to store its state. If that storage location hasn't been properly initialized (or got wiped), the object throws 0x80040012.
Common root causes:
- Corrupted OLE temp files — Windows caches OLE data in
%TEMP%or theOLEsubfolder. Malformed files here block new storage creation. - Broken COM registration — The OLE32.DLL or its dependent registry keys (like
HKEY_CLASSES_ROOT\CLSID) got corrupted by a bad uninstall or update. - Missing storage pointer — The app didn't call
StgCreateDocfilecorrectly before handing the object to the client site.
The fix — step by step
Skip the shotgun approach. Here's the order that works without breaking other things.
Step 1: Clear OLE temp files
Open an admin Command Prompt or PowerShell and run:
del /q /s %TEMP%\*.tmp
del /q /s %TEMP%\ole*
rd /s /q %TEMP%\OLE 2>nul
The reason step 3 works is that Windows recreates the OLE folder on demand. If a stale file blocks storage creation, clearing it forces a fresh IStorage allocation.
Step 2: Re-register OLE32.DLL
regsvr32 /u OLE32.DLL
regsvr32 OLE32.DLL
This reloads the COM infrastructure. Do it even if you think nothing's wrong — I've seen half a dozen cases where a silent corruption in the cached CLSID entry causes 0x80040012. The unregister/register sequence ensures the class factory is rebuilt.
Step 3: Fix the registry
If step 2 alone didn't work (check by re-opening the object), the issue is likely in HKEY_CLASSES_ROOT\CLSID. Export the key first as backup:
reg export HKCR\CLSID C:\backup_clsid.reg
Then run this to reset OLE-specific entries:
reg query HKCR\CLSID /s /f "OLE" /k > C:\ole_keys.txt
Manually check the output for orphaned or empty InprocServer32 paths. The fix is to delete any key where a required DLL path points to a missing file. Focus on entries like:
{0003000A-0000-0000-C000-000000000046} (OLE1ClassFactory)
Step 4: Repair the Office installation
If registry surgery didn't fix it, Office has deeper corruption. Run setup.exe /repair from the original installer, or go to Settings > Apps > Microsoft Office > Modify > Repair. This rebuilds the OLE proxy/stub DLLs that Office relies on.
What to check if it still fails
Three things I'd look at next:
- Antivirus interference — Some AV suites (looking at you, McAfee) hook
StgCreateDocfileand block OLE storage creation for unknown file types. Temporarily disable real-time scanning and test. - User profile corruption — Log in as a different admin user and open the same document. If it works, the problem is in your
NTUSER.DAT. Nuke the old user or rebuild the profile. - Missing VC++ redistributables — OLE uses the C runtime. Run
DISM /Online /Cleanup-Image /RestoreHealththen reinstall all Visual C++ redistributable packages from 2005 to 2022. Yes, all of them — different versions of OLE components link to different MSVCRT versions.
If none of this works, the document itself is likely toast. Extract the object data using a hex editor (look for the 1 OlE10Native marker in the docx's zip archive) and recreate the embedded object from scratch. That's a last resort but it's saved my data twice.
Was this solution helpful?