Environment: MS Office LTSC Pro Plus 2021 under Windows 11 Pro 64.
This is a follow-up to my question on StackOverflow: In MS Outlook VBA, how to find hidden data in a MailItem.
I've been studying the contents of my Outlook
pst file. It contains e-mails sent and received since 2004, 19 years.
I use outlook only for e-mail. I don't use its calendar or other features, although sometimes it stores events in the calendar when someone asks for a meeting and I respond. I assume that the contents of the pst file not directly attributable to e-mails contained in it is negligible.
On June 1, I output the properties of all items in e-mail folders of the pst file to MS Access. This was 300,723 items. The sum of the property
MailItem.Size for all items is 9.5 * 10^9. Unfortunately, I did not save a copy of the pst file at that time, but the size of my backup file on May 27 is 15.7 * 10^9 and the observed size of the file on June 9 was 15.8 * 10^9. So I estimate that the size of the pst file on June 1 was 15.7 * 10^9. This means that the size of the file is 6.2 * 10^9 or 65% larger than the sum of the
MailItem.Size of all the items.
In the StackOverflow question linked above, in the section Hidden data, I noted three strange observations. The first was that Outlook appears to be saving hidden copies of e-mail attachments that I removed. The third was that Outlook appears to be saving hidden copies of e-mails that I permanently deleted (i.e., not just moved to the folder "Deleted Items").
The new observation that the size of the pst file is 65% larger than the total
MailItem.Size of all the e-mails found in its folders appears to be consistent with the previous observations that removed attachments and deleted e-mails seem to be hidden somewhere in the file. But before assuming that that is correct, I need to know what the storage overhead is for e-mails in Outlook. In other words:
- If the total
MailItem.Sizeof all e-mails stored in a pst file is x, with no attachments removed and no e-mails deleted from the folder "Deleted Items", and the size of the file is y, what the expected size of the ratio y/x?
Assuming that the answer to that question is far less than 1.65, I am left with the questions asked in the StackOverflow question: How can I find where in the data structure of the file those removed attachments and deleted e-mails are hidden, and how can I remove them from the file?