Quick answer
If you're hitting 0x800300FB, the file you're opening has an invalid OLE compound file header — either it was renamed from another format (like RTF or HTML) or it's genuinely corrupted. Check the file's actual header bytes first.
What's actually happening here
Office files (.doc, .xls, .ppt) from versions before Office 2007 aren't plain XML. They use the OLE2 (Compound File Binary) format, which starts with a specific header — the bytes D0 CF 11 E0 A1 B1 1A E1. When Windows or an Office app tries to read the file, it checks that header. If it doesn't match, you get STG_E_INVALIDHEADER (0x800300FB).
The most common trigger: someone took an RTF or HTML file, changed the extension to .doc or .xls, and sent it to you. Or you downloaded a file that got mangled in transit. The header is the first thing the OLE parser reads, and if it's not there, everything else fails.
Fix steps
- Check the real file type. Open a command prompt in the file's folder and run:
Look for the first bytes. If you seecertutil -dump "yourfile.doc" | findstr /i "header"7B 5C 72 74, that's an RTF file. If you see3C 68 74 6D, it's HTML. Neither is a valid compound file. - Rename to the correct extension. If it's RTF, rename to .rtf and open in Word. If HTML, rename to .html and open in a browser or Word. That alone often fixes the error.
- Try opening with the right program. Sometimes Office just needs a nudge. Double-click, but when Windows asks which program, pick WordPad or Notepad. If you see readable text, you can copy-paste it into a new Office document.
- Use the built-in repair. In Excel or Word, go to File > Open, select the broken file, click the dropdown next to Open, and choose Open and Repair. This only works if the header is partially intact, so it's worth a shot but not a guarantee.
- Recover with a hex editor. If the header is zeroed out but the rest of the data looks intact, you can manually rewrite the first 8 bytes. Open the file in a hex editor (like HxD), set bytes 0-7 to
D0 CF 11 E0 A1 B1 1A E1, save, and try opening again. This is a long shot but works for files that got truncated at the start.
If nothing works: alternative fixes
- Use a third-party recovery tool. Tools like Recuva or Disk Drill can scan the drive for remnants of the file. Sometimes, the original file is still in a temp folder (like
C:\Users\<you>\AppData\Local\Temp) with a .tmp extension. Search for files modified around the same time. - Check the email attachment again. If the file came via email, ask the sender to re-save it in the correct format (File > Save As > .xlsx or .docx) and resend. Nine times out of ten, that's the fix.
- Look at the file size. A valid compound file is at least a few KB. If it's under 1 KB, it's probably a text stub, not a real document. Forget fixing it — ask for a new file.
Prevention tip
Stop letting Windows hide file extensions. Go to File Explorer Options > View > uncheck “Hide extensions for known file types.” That way, you'll see that `report.doc` is actually `report.doc.rtf` before you double-click it. Also, if you're on a Mac or Linux machine, be careful when sending Office files — the extension may not match the content. Always verify with file command if you can.