• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 207
  • Last Modified:

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

  • 2
1 Solution
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
David LeeCommented:
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

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now