Opening attachments with same name leaves temp files behind... is this an outlook bug?

When we receive faxes our fax server forwards them as faxmessage.tif

when you open this in outlook it creates a temp file in temporary internet files.
when you close outlook this temp file is cleaned up

However if you open several faxes throughout the day it creates several like this

now when you close outlook only the last one gets cleaned up.  eventually you reach a limited of 100 and you can no longer open attachments with this name until you delete them

we are using windows default fax viewer to view these faxes
we are running windows 2000
the clients are outlook 2003

Who is Participating?
David LeeConnect With a Mentor Commented:
I'm not sure that Outlook is the culprit, although I suppose it could be.  Outlook saves its temporary files to a special folder at C:\Documents and Settings\<username>\Local Settings\Temporary Internet Files\OLK??? (where ??? = a 2 or 3 character string generated by Outlook).  If these files aren't in that folder, then Outlook may not be directly responsible for them.  The fax viewer software may be at fault.  Either way the macro below can clean them up.  It will fire each time Outlook is closed.  When it does, it will delete all.tif files in the Temporary Internet Files folder.  Follow these instructions to use it.

1.  Start Outlook
2.  Click Tools->Macro->Visual Basic Editor
3.  If not already expanded, expand Microsoft Outlook Objects in the Project pane, then click on ThisOutlookSession
4.  Copy the script below
5.  Paste the script into the right-hand pane of the VB Editor
6.  Click the diskette icon on the toolbar to save the changes
7.  Close the VB Editor
8.  Click Tools->Macro->Security
9.  Set Security Level to Medium
10.  Close Outlook
11.  Start Outlook
12.  A dialog-box will appear telling you the ThisOutlookSession contains macros and asking if you want to enable them.  Say yes.

Sub Application_Quit()
    Dim objFSO As Object, _
        wshShell As Object, _
        wshEnv As Object, _
        strPath As String
    Set wshShell = CreateObject("WScript.Shell")
    Set wshEnv = wshShell.Environment("PROCESS")
    strPath = wshEnv.Item("USERPROFILE")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    On Error Resume Next
    objFSO.DeleteFile strPath & "\Local Settings\Temporary Internet Files\*.tif", True
    Set wshEnv = Nothing
    Set wshShell = Nothing
    Set objFSO = Nothing
End Sub
David LeeCommented:
Hi Zoldy2000,

One solution to this is a macro that'd run each time Outlook shuts down and delete these files.  Is that an option?

Zoldy2000Author Commented:
Yes I suppose that would work... However I was looking for more of a solution rather than a work around...

Thank you
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.