Finding temp folder. Environment variable?

D

Don Wiss

I'm starting an enhancement where my spreadsheet will save a bunch of PDF
files into a folder, and then I'll call some application on the server that
will append them all together. For the appending I'm looking at:
http://appligent.com/products/append_pdf_pro/append_pdf_pro.php

It would make sense to me to put all the files in a folder under the Temp
folder. My recollection is the path to the temp folder was in an
environment variable. How do I read it? Or is it someplace in the Registry?
I have code to read that, if I know the location where it is stored.

Don <www.donwiss.com> (e-mail link at home page bottom).
 
D

Dave Patrick

MsgBox Environ$("temp")

--

Regards,

Dave Patrick ....Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect

:
| I'm starting an enhancement where my spreadsheet will save a bunch of PDF
| files into a folder, and then I'll call some application on the server
that
| will append them all together. For the appending I'm looking at:
| http://appligent.com/products/append_pdf_pro/append_pdf_pro.php
|
| It would make sense to me to put all the files in a folder under the Temp
| folder. My recollection is the path to the temp folder was in an
| environment variable. How do I read it? Or is it someplace in the
Registry?
| I have code to read that, if I know the location where it is stored.
|
| Don <www.donwiss.com> (e-mail link at home page bottom).
 
T

Tom Ogilvy

General one should feel safe/comfortable to have anything in the temp folder
deleted.

If they fit that definition, then that would be a good place.
 
R

Ron de Bruin

Another option is to use filesystemobject

Sub GetTempFolder_1()
MsgBox Environ("Temp")
'Open folder in Explorer
Shell "explorer.exe " & Environ("Temp"), vbNormalFocus
End Sub

Sub GetTempFolder_2()
Dim FSO As Object, TmpFolder As Object
Set FSO = CreateObject("scripting.filesystemobject")
Set TmpFolder = FSO.GetSpecialFolder(2)
MsgBox TmpFolder
'Open folder in Explorer
Shell "explorer.exe " & TmpFolder, vbNormalFocus
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top