When attempting to open an attachment in an Outlook message you receive the following error:
Cannot create file: image.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 attachment fails to open.
This issue is usually caused when more than 99 attachments with the same name have been opened.
When attachments are opened they are saved into a temporary folder (e.g. ‘image.tif’). If the file name is already in use, it will save it as ‘image(1).tif’, As more files are opened it will continue to create new files until it gets to ‘image(99).tif’ after this it will be unable to create any new files and will fail to open any attachments with the file name of ‘image.tif’.
To resolve the issue you will need to delete the duplicate files in the temporary folder.
STEP 1: Locate the temporary folder
The path to this folder changes depending on which version of Windows and Office you have installed. You will need to check the registry to get the folder path.
- Open the registry editor (Start -> regedit)
- Navigate to the path below for your version of Outlook
- Open the ‘OutlookSecureTempFolder’ registry key and take note of the path
- Navigate to the folder path.
STEP 2: Delete the duplicate files
- Delete the duplicate files (or all files)
OPTIONAL STEP: Script to delete the folder
The following VBS Script can be used to delete the contents of the Outlook temporary attachment folder (Secure Temp Folder).
It will only work for Outlook 2010 but can be modified for other versions by changing the ‘RegValue’ value.
To use save the contents into a text file and save with the ‘vbs’ extension. E.g. ClearOutlookTemp.vbs
Set net = CreateObject("WScript.Network")
Set WshShell = WScript.Createobject("WScript.shell")
RegValue = WshShell.RegRead("HKEY_CURRENT_USER\Software\Microsoft\Office\14.0\Outlook\Security\OutlookSecureTempFolder")
WshShell.run "cmd /C del " & chr(34) & RegValue & "*.*" & chr(34) & " /Q /F", 0, True
wscript.echo "Outlook TEMP Folder has been cleared"