In order to free up some disk space, I tried compacting my Outlook 2007 .ost file earlier this week. This should happen automatically in the background when my PC is idle, and it probably has been, but my file was large and manually executing the compacting function saved me around 20% of the file size.
However, today, and quite by accident, I discovered a much better way of reducing the size of the .ost file and got it down by another 50%, or, in other words, reducing it to 40% of the original size.
Important: this method does not work with .pst files. Only use it on .ost files which are a copy of data held on your exchange server. If you are not sure what that means, do ask someone who does know before you try this.
My laptop failed to wake up from hibernation and I had to do a full reboot, and when I tried to launch Outlook I discovered that my .ost file was corrupt. There is a tool called scanpst which will attempt to repair .ost and .pst files, but then I wondered what would happen if I just deleted the corrupt file; all the data in the file is also on the Exchange server, so presumably Outlook could re-create the .ost file. A quick search on google confirmed that this would work, so after renaming my .ost file (just in case it didn’t work), I restarted Outlook.
Outlook started with an empty calendar, empty mailbox, and empty contacts, but as soon as I tried to open one of the relevant folders, it started to download the contents of that folder from the server. I picked the folders I needed most immediately (such as my inbox) so that it would do them first, and then tried opening each of the other folders in turn to ensure that they were downloaded. Outlook downloaded more than one folder at a time.
The biggest folder was my inbox and that took a couple of hours to complete, but the big surprise, when it had all finished, was that the .ost file was only half the size of the old one, even when that old one had been compacted. Further, the time taken to create the new one was a lot less than the time taken to compress the old one, and I was able to use Outlook while the download took place. When compressing a .ost file, it is not possible to do anything else with Outlook, and due to the significant disk activity, other things on the PC run slowly.
Next time I need to compress my .ost file, I will simply be creating a new one.