Fix STG_E_OLDFORMAT (0x80030104) – Old Compound File Error
This error means an old OLE compound file can't be read by your current application. We'll fix it by updating or converting the file.
Quick Answer
If you see error 0x80030104, your file uses an older version of OLE storage. Open it in the original app that created it, save as a newer format (like .docx or .xlsx), or use a tool like ole2openxml to convert it.
Why This Happens
I’ve seen this error pop up most often when someone tries to open a Word document or Excel spreadsheet from Windows 95 or early Office 2000 days in a recent version of Office (2016 or later). The compound file format changed subtly between major OLE versions—old storage uses a 512-byte sector size, while newer ones use 4096 bytes. The app sees the mismatch and throws STG_E_OLDFORMAT.
You’ll also hit this with some old backup software archives that used OLE compound storage. It’s not a corrupt file—it just can’t be read by the current app without conversion.
Step-by-Step Fix
- Try the original app – Install the version of the program that created the file. For old Office docs, that might be Office 97 or 2000. Open it there, then Save As to a modern format (e.g., .docx, .xlsx, or .pptx).
- Use a free converter – If you don’t have the old app, grab
ole2openxml(available on GitHub). Run this command in a terminal:ole2openxml oldfile.doc newfile.docx
This extracts the inner content and repackages it as a modern OOXML file. - Try a hex editor workaround – For advanced users: open the file in a hex editor (like HxD). Locate the first 8 bytes—if they’re
D0 CF 11 E0 A1 B1 1A E1, it’s an OLE file. Change the sector shift byte (offset 0x1E) from 9 to 12 (0x09 to 0x0C) to fake it as a newer format. Save a copy first. This is risky—I only recommend it if you’re comfortable with hex and have a backup. - Reinstall the app – Sometimes the error means your app’s OLE libraries are corrupted. Repair Office via Control Panel → Programs and Features → right-click Office → Change → Quick Repair. For other apps, reinstall from scratch.
What If the Main Fix Doesn’t Work?
If you still get the error after conversion, the file might be genuinely damaged. Open it in a text editor like Notepad—if you see random garbage, it’s beyond repair. Try a dedicated file repair tool (e.g., Stellar Repair for Office). For truly ancient files (pre-1995), you may need a virtual machine running Windows 3.1 or NT 4.0 with the original software.
Prevention Tip
Keep a copy of the original app (or a virtual machine image) for any ancient compound files you work with regularly. Convert everything you can to modern formats—don’t wait until you get the error. Also, disable “Block older versions of files” in Office’s trust center settings if you’re opening old docs frequently: File → Options → Trust Center → Trust Center Settings → File Block Settings → uncheck items for old formats.
Was this solution helpful?