Fix OLE_E_NOTRUNNING (0x80040005) — 'Need to run the object' error
This error means an OLE object (like an Excel chart or Word doc) isn't running or registered. The fix is usually restarting the COM server or repairing the app.
Quick Answer
Restart the COM+ Event System service and the app providing the OLE object (e.g., Excel, Word). If it still fails, repair Office or reset DCOM permissions using dcomcnfg.
What's going on?
You get OLE_E_NOTRUNNING (0x80040005) when an embedded OLE object — say, an Excel chart inside a Word doc or Outlook email — can't find its parent application running. The culprit here is almost always a hung COM server. The object's application (like Excel) crashed, got stuck in a bad state, or the registration got corrupted. I've seen this most often in Outlook when someone double-clicks an embedded spreadsheet and gets that error instead of Excel opening.
The error literally means "I can't talk to the object's server because it's not running." Your system knows which app should host it, but that app isn't responding or isn't registered properly.
Fix 1: Restart the COM+ Event System and the app
Don't bother with a full reboot yet — this is faster:
- Open Services (
services.msc) as admin. - Find COM+ Event System. Right-click → Restart.
- Also restart DCOM Server Process Launcher if it didn't stop with COM+.
- Now close and reopen the application that hosts the OLE object (e.g., close Outlook, then reopen it).
- Try the operation again.
If the app itself (like Excel) was hanging, kill it from Task Manager first. The COM server restart forces a clean state.
Fix 2: Repair the offending Office app (if it's Office)
This error loves Office 2016 and 2019. Run a quick repair:
- Go to Control Panel → Programs and Features.
- Find Microsoft Office (or the specific app like Microsoft 365).
- Right-click → Change → select Quick Repair. That takes 2-3 minutes.
- If that doesn't work, run Online Repair — it needs internet and takes longer but fixes corrupt files.
Fix 3: Check DCOM permissions
Sometimes permissions are the issue, especially on locked-down corporate machines. Here's the drill:
- Open
dcomcnfgas admin (Run →dcomcnfg→ OK). - Expand Component Services → Computers → My Computer → DCOM Config.
- Find the problematic app (e.g., Microsoft Excel Application).
- Right-click → Properties → Security tab.
- Under Launch and Activation Permissions, click Edit.
- Make sure NETWORK SERVICE and INTERACTIVE have Local Launch and Local Activation allowed.
- If not, add them. Apply, OK, and restart the app.
I've seen this fix a lot on Windows 10 Pro machines after a security patch changed the defaults.
Fix 4: Reset OLE registration (advanced)
If nothing else works, the OLE registration might be corrupted. You can rebuild it:
- Open an elevated Command Prompt.
- Run:
regsvr32 /u oleaut32.dll - Then:
regsvr32 oleaut32.dll - Do the same for
ole32.dllandoleacc.dll. - Reboot.
This re-registers the core OLE libraries. It's rare you need this, but it's saved my ass twice in 14 years.
Alternative fixes if nothing above works
- Check for broken add-ins: In Outlook, go to File → Options → Add-ins. Disable all COM add-ins, restart, test.
- System File Checker: Run
sfc /scannowfrom an admin command prompt. Corrupted system files can break OLE. - Update Windows and Office: Microsoft patched several OLE bugs in KB5008212 and later cumulative updates. Make sure you're current.
- Reinstall the app: Last resort. Uninstall, reboot, reinstall.
Prevention tip
Keep Office and Windows updated. If you frequently embed objects (like Excel tables in Word), make sure you close the source app cleanly after editing — don't just force-kill it. A hung Excel process is the number one trigger for 0x80040005. Also, avoid running Office apps from a network share — that confuses the OLE runtime.
Pro tip: If you see this error in a custom app you're developing, check that the object'sQueryInterfaceforIOleObjectreturns properly. The error often means the server object isn't in the running state — callOleRunbefore accessing it.
Was this solution helpful?