Outlook 2003 and Its 99th Attachment Problem

I recently discovered an interesting little problem while troubleshooting an Outlook 2003 issue, and figured it might be of help to other users out there. I’d come across the problem before, but didn’t remember the solution. So, this article is just as likely to help me in the future as it is anyone else.

Soon, Outlook 2003 (along with the rest of Office 2003) will be a long-forgotten relic of the past (right now, it’s only a nearly-forgotten relic). Office 2003’s support lifecycle will end on August 14th, 2014. After that point, Microsoft will no longer support Office 2003 with new security updates. This is likely to result in a large number of unpatched security flaws, similar to the Windows XP problem that the security community is currently anticipating. I strongly urge any remaining Office 2003 users to move to a newer version of Office, as soon as possible. With all of that said, I know there are a number of Office 2003 users still out there, so on with the post.

The issue started with one of my users reporting this error when trying to open an attachment in Outlook:

Can’t create file: Fax1.TIF. Right-click the folder you want to create the file in, and then click Properties on the shortcut menu to check your permissions for the folder.

The fax system that sent the message that caused this error always uses the filename “Fax1.TIF” for its attachments. Other attachments on other e-mails continued to open normally, but none of the fax attachments (past or present) worked.

The error message suggested a permission problem, but that seemed unlikely as nothing had changed on the user’s system. The first thing to do was to track down where the attachments were being saved when opened through Outlook. After all, maybe it WAS some sort of weird permission error.

You can find the system path where Outlook saves files in the Registry. Take a look at the OutlookSecureTempFolder parameter under the HKCU\Software\Microsoft\Office\11.0\Outlook\Security\ key. On Windows 7, assuming the path hasn’t been changed from its default, it should look something like C:\Users\<username>\AppData\Local\Microsoft\Windows\Temporary Internet Files\OLK<4 random characters>\.

With the proper path now in hand, I headed for that location. Upon arriving at my destination, I quickly discovered the issue.

The file listing I found myself faced with when troubleshooting an Outlook 2003 attachment issue.

The file listing I found myself faced with when troubleshooting an Outlook 2003 attachment issue.

Whenever one opens an attachment in Outlook 2003, the program first saves the attachment to the local hard drive, then runs it from that location. Before saving the attachment, Outlook first checks to see if any other files with the same filename exist in that location. If such a file exists, then in the interest of not overwriting said file, Outlook tacks a sequential number on to the end of the new file’s filename.

For the most part, this system works fine. The problem is that Outlook doesn’t know what to do if 99 other files already exist. Apparently counting isn’t its strong point. Since Outlook didn’t know what to do, it assumed that it just couldn’t write the file and threw up the permissions error. Clearly, somebody missed a potential error path when writing their error-trapping code.

Upon clearing out the previous 99 files, the error went away and Outlook was now able to save the attachments without issue. In the end, the solution to this rare and initially-perplexing problem was pretty simple. If only they were all this easy.