snp to Desktop

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I know this is an DOS question but!!!!
I want to give the user the ability to run a report and save an snp file to
his/her desktop. The path seems to be (on my system)
c:\Profiles\'myname'\Desktop. Is there a generic way to do this so it will
work on any users system?
 
NNlogistics said:
I know this is an DOS question but!!!!
I want to give the user the ability to run a report and save an snp file to
his/her desktop. The path seems to be (on my system)
c:\Profiles\'myname'\Desktop.

On mine (Access 2000, Win XP), the "Output To" action in a Macro accepts
as the Output File just the file name (including the .snp extension, but
without any other pathname) and writes the file to the Desktop. For
example:

Output File R_Report.snp

Is there a generic way to do this so it will
work on any users system?

I'm not an expert, but my guess is no. Windows XP may do it differently
from Windows 2000 or Windows 98, etc. Can you narrow it down a bit?

-- Vincent Johns <[email protected]>
Please feel free to quote anything I say here.
 
Thanks Vincent, but no. On my system it goes to the directory that the
database is in which would be ok but I cant say for sure that will happen on
all the users systems. Its probably a registery setting. If I had a
absolute generic path for the desktop , I think that would work.

Thanks again
 
There's code at http://www.mvps.org/access/api/api0054.htm at "The Access
Web" that will allow you to return the location of the "special" folders. I
believe you'll want to use fGetSpecialFolderLocation(CSIDL_DESKTOP).

You can also use Windows Script Host:

Dim objWshShell As Object
Dim strDesktop As String

Set objWshShell = CreateObject("WScript.Shell")
strDesktop = objWshShell.SpecialFolders("Desktop")
 
Doug

Thanks for the help. Right now thats a little over my head. I need some
time to absorb
 
Back
Top