Technical support: Outlook OST file cannot be opened with Outlook
3minutes reading time
So what did I do?
When this happens and you search for this problem online, most websites state that this error occurs because the mentioned OST file is corrupted. One of the solutions is to run the SCANPST.EXE tool that comes with your Office installation. This tool attempts to repair your OST file and reports that it was successful, but it did not fix the problem.
Another solution is to simply delete the file and let Outlook recreate it. The strange thing is that Outlook immediately complains that it cannot open the file, even though it contains no data. A 0-byte file is created, and yet it's classified as corrupted. At this point I even consider reinstalling a tool, which I now realize would have been a much bigger waste of time.
I found this solution myself, but it sheds some light on the nature of the problem: Office comes with a mail setup tool that is also added to the Control Panel, and there you can change your data files, which are the default ones, or even set up a cache for the service you use. You can open the properties of a storage, and in this window there should be a checkbox labeled "Use Cached Exchange Mode". If you uncheck this, your emails will only be available when you're online, but at least you can start Outlook now.
After reassuring myself that I can finally use Outook again, I found an article about the same problem, which also mentioned the same setting I just found. But this article explains that this file saves all emails so you can read them offline. It also explains that a sudden crash or shutdown can corrupt the file.
This got me thinking: Outlook is a huge system, and it's not unlikely that it tracks the use of a file outside the system, so it's possible that I can do whatever I want with the file while Outlook considers it locked and can't access it because a precondition is not met. So if I restart my PC, the problem should be fixed, right? and this article shows another error message suggesting the same thing, while the article itself suggests restarting the whole Outook utility and services by hand.
Conclusion
So I restarted it. And now it works. Would this have been a solution from the beginning? I don't know, but it's certainly possible. My recommendation is that whenever you are done for the day and want to shut down, hibernate or put your PC to sleep, quit Outlook first. If you haven't followed this and have the same problem, restart your PC. I am surprised that this is not the first solution.
Solution summary
Above all: restart your PC! It could be that Outlook is just confused and thinks it is in use, when in fact it is not. Then you should try to perform the suggested steps.