Databaseman
07-11-2007, 06:10 PM
I have a module that attaches a pdf document that has been auto saved to the default location of the user computer. Since the default location on each computer will be different. I need the code to pick up this location.
What is the method for referencin the default path on a user computer
lagbolt
07-11-2007, 07:22 PM
The default path to what? If you have a module that attaches this document, get the path from that module. Or do you mean you have a module that fails to attach this document?
Databaseman
07-11-2007, 07:44 PM
A pdf document is created using adobe, this saves teh fiel in the default windows location. I need the module to find the default windows location and attach this file according to the user.
At the moment my moduel requires a filepath, i cant hard code a path into this, as the default location where the pdf file is saved, varies according to the user
lagbolt
07-13-2007, 12:39 PM
It seems to me that you are looking for where your Adobe program saves it's files. Perhaps you can automate Adobe on the user's machine and read a setting for where it saves its files by default, but still, couldn't a user save a file anywhere?
Moniker
07-13-2007, 10:49 PM
Environ("HomePath") will return a default save location, but not necessarily the default save location. Most programs have default save locations that vary from program to program.
A better solution is to have your users store PDF files to a defaults PDF location (C:\PDF\, perhaps).
You may want to loop through the Environ commands and see if another path (there are a few in there) better suits your needs.