Page 1 of 2 12 LastLast
Results 1 to 15 of 18
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Tacoma, Washington, USA
    Posts
    431
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Outlook Temp Folder Build Up (Outlook 2000/2003)

    We use copiers that can also scan documents and then send them via our email system. When they arrive in the user's Inbox the attachment is always named the same - SCAN.PDF. When the user opens this file, the file is added to the user's Outlook temp folder (OLK#). Where one might already exist with this name, it adds a number in parathensis to the name - SCAN.PDF, SCAN(1).PDF, SCAN(2), PDF, etc. When the user closes the attachment without saving, the file continues to exist in their Outlook temp folder thus these SCAN files build up in there. Once they number 100 - SCAN(99).PDF - Outlook can go no higher in number and won't permit the SCAN file to be opened. It gives the following error:

    Can't open the file. Can't create file: SCAN.PDF. Right-click the folder you want to create the file in, then click Properties on the shortcut menu to check your permissions for the folder.

    Permissions obvious have nothing to do with the reason it won't open the file. When this happens, I have to go in and delete all the SCAN(##).PDF files from the Outlook temp folder. Then the email attachment will open.

    If this weren't enough, the accounting department has the same problem with reports commonly export from our accounting program and attach to emails. Those reports are always sent to email from the accounting program named OMEGA.RTF. Again, once there's 100 of them built up in a user's Outlook temp folder they have to be deleted to get the files to open again.

    I'm trying to figure out a solution. I'm not always here to empty their Outlook temp folders. I thought to write a script they could run, but the name of the Outlook temp folder varies by machine. Suggestions?
    Daisy

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/2003)

    In the first place, you should educate your users to avoid opening attachments directly from an e-mail, but to save attachments to a local or network disk, then open the saved version. But of course, there will always be users who will still open attachments directly, so the problem remains.

    The location of the temporary attachment folder can be found in the Windows Registry: it is the value of OutlookSecureTempFolder in the key

    HKEY_CURRENT_USERSoftwareMicrosoftOffice9.0Outlook Security

    (9.0 for Outlook 2000, 10.0 for Outlook 2002 and 11.0 for Outlook 2003)

    You can use this in your script.

  3. #3
    Administrator
    Join Date
    Mar 2001
    Location
    St Louis, Missouri, USA
    Posts
    23,577
    Thanks
    5
    Thanked 1,057 Times in 926 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/2003)

    12.0 for Outlook 2007

    Joe
    Joe

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/2003)

    Yep, thanks for the addition. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/200

    This is a troubling solution, for the reason that the macro might be less benign...

    Anyway, I've attached a module you could send in a Word document for ad hoc clean-outs. It takes advantage of the fact that when the document is opened, it opens from the cache folder. The criteria for clean-out, of course, are up to you. Note that this is set up for "early binding," so your Word document needs a reference to the Microsoft Scripting Runtime.
    Attached Files Attached Files

  6. #6
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/2003)

    See the discusssion in <!post=this thread,663,020>this thread<!/post> ; the VBS attachment link is no longer valid, so here it is again (rename the .TXT file to .VBS).
    Attached Files Attached Files
    -John ... I float in liquid gardens
    UTC -7ąDS

  7. #7
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Tacoma, Washington, USA
    Posts
    431
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/200

    I get a compile error when I run jscher2000's script (saved as a .vbs file) but John's works very well. I knew I couldn't have been the first person with this problem but didn't come across the earlier posts when I searched. Wrong keywords I guess. I think there could be problem when it comes to running it on the user's desktop because of global software restrictions in place on the network. I'll have to test and see how that goes.
    Daisy

  8. #8
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Tacoma, Washington, USA
    Posts
    431
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/200

    Even though I cut a whole in the software restriction global policy to the location on a shared drive where the script is located, I still get this error message: "Execution of the Windows Script Hosting failed." Is this still being caused by the software restriction global policy or is it something else?
    Daisy

  9. #9
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/200

    > I get a compile error when I run jscher2000's script (saved as a .vbs file)

    It's a VBA module. To import it into a Word document, first save it somewhere and rename it back to a .bas extension. Then, from a new Word document, open the VBE (press Alt+F11), highlight the new document in the Project Explorer pane, and use File>Import to add the module. Use Tools>References to add a reference to the Microsoft Scripting Runtime.

    Should compile then. Or use the attached document.
    Attached Files Attached Files

  10. #10
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/200

    <P ID="edit" class=small>(Edited by JohnBF on 26-Sep-07 07:04. Added code)</P>If you are referring to my script, that message would indicate that WSH is disabled. If you mean Jefferson's script, as he has explained it is VBA intended to be run via Word as a client. Attached is the script in Outlook macro form.

    Another alternative is to find a Hidden, System, Folder, whose name inludes "OLK", as a subfolder of the "...Documents and Settings<username>Local SettingsTemporary Internet Files" folder, and create a shortcut to it. From there it can be opened and selectively managed (a security warning will be provided each time it is accessed). Though I have read that Windows may move this folder, that hasn't happened on three machines I regularly use ... yet. <img src=/S/anigrin.gif border=0 alt=anigrin width=19 height=19>
    Attached Files Attached Files
    -John ... I float in liquid gardens
    UTC -7ąDS

  11. #11
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/200

    Mumbling to self ... well, bother! The attachment to that last post of mine also calls the WSH, so may not work for machines on which WSH is disabled. Now I find that Outlook has no

    Outlook.Application.System

    Property which means it has no .PrivateProfileString Property which means either I have to instance another Office Application or use an API call such as http://www.arcatapet.net/vbregget.cfm. Anyone know of another, simpler, non-WSH method?

    For now see the attached version.
    Attached Files Attached Files
    -John ... I float in liquid gardens
    UTC -7ąDS

  12. #12
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Tacoma, Washington, USA
    Posts
    431
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/200

    Post deleted by ailios
    Daisy

  13. #13
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Tacoma, Washington, USA
    Posts
    431
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/200

    I imported the macro into a startup template. I had some trouble (earlier posts deleted) because I didn't add the reference to Microsoft Scripting Runtime. I finally remembered and did that. Saved, set as my startup template and now when I run the script it says: "Not able to determine your cache folder." The Outlook temp folder is there where it always is and there's files in it for testing. Not sure what to do now. Suggestions?
    Daisy

  14. #14
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/200

    Jefferson's code won't work from a startup template. You're supposed to send a document with the code as attachment in an e-mail to yourself, then open the attachment from within the received e-mail and run the macro.

  15. #15
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: Outlook Temp Folder Build Up (Outlook 2000/200

    Code in the attachment to <post:=667,673>post 667,673</post:> should run from Outlook without WSH, though it won't be quite so fast as it creates an invisible instance of Word.
    -John ... I float in liquid gardens
    UTC -7ąDS

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •