Archive for September, 2012

11
Sep
12

Outlook will not open attachments with specific file names

Sometimes, when you’re trying to open an attachement from Outlook, it will refuse to do so, telling you something about insufficient disk space or lack of permissions. This will almost always happen with an attachment filename that you’ve opened many times before. For example, when you receive a weekly report called “Weekly Report.xls”.

Everytime you open a file, Outlook creates a local copy of the file in a temp folder. Next time you will open a file with the same name, it will add a (02) in the file name and so on, until it reaches (99). After that, it will not let you open the file. The solution to this annoying problem is actually pretty simple. All you need to do, is empty the temp folder and restart Outlook.

In order to do so, open up Registry Editor* and locate the following key: OutlookSecureTempFolder. 
You can either CTRL+F to find it, or navigate to HKEY_CURRENT_USER\Software\Microsoft\Office\11.0\Outlook\Security. Please note that 11.o refers to Office 2003. I don’t know whether this problem continues to appear in newer Office versions, but if you come accross it, instead of 11.0, you are looking for a 14.0.

Double click on the key, and copy the folder location. Now paste this in an explorer window and open the folder. Select all the files in there, delete them and restart Outlook. You’re done. Simple enough yes? This is a well known problem and it has been documented many times already.

While easy to solve, this problem can become really annoying when it appears often. So we are going to make our lives a bit simpler and automate this proccess.

First, we need to change the folder’s location to somethig simpler. I created a folder named “OutlookTemp” and changed the registry key to the new location.

In order for our changes to take effect, we need to restart our computer. Do that and then open Outlook. Find a couple of emails with attachements and open them. Now, if you navigate to the folder you selected as your new Outlook temp folder, you will see that there are already some files in there.

In the image above you notice that I opened the same attachment twice and it created second file.

If you are using a program to maintain your computer, such as CCleaner or System Mechanic, there might be an option to include this folder, so it will be cleaned up automatically. Since I don’t use such programs, I found a simple script that performs just this task:

set folder=”C:\OutlookTemp”
cd /d %folder%
for /F “delims=” %%i in (‘dir /b’) do (rmdir “%%i” /s/q || del “%%i” /s/q)
All you need to do is put the three lines above in a text file, save it as OutlookTempClean.bat (or any other name you like) and you are ready to go.
If you so wish, you can schedule this batch file to run once a month, or whenever you feel like) and you will not have to worry yourself again.
*I hope you understand that messing around with Registry Editor can cause problems with your computer and you need to be really careful. Yes, treat this sentence as a disclaimer.



September 2012
M T W T F S S
 12
3456789
10111213141516
17181920212223
24252627282930