![]() | |
![]() |
| | Thread Tools | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
New at macros, trying to send a report to file so it will work on any machine. I can't figure out how to send to the TMP directory, or to MY DOCUMENTS without knowing the user's name... what do I put in the OutputFile box when creating a macro to send it to either the environment variable TMP (there's one on every machine), or the user's MyDocuments directory, without hardcoding for a specific user? Thank you kindly. |
#3
| |||
| |||
|
|
On Wed, 9 Jan 2008 17:05:49 -0800 (PST), John Bartley K7AAY john.bart... (AT) gmail (DOT) com> wrote: New at macros, trying to send a report to file so it will work on any machine. I can't figure out how to send to the TMP directory, or to MY DOCUMENTS without knowing the user's name... what do I put in the OutputFile box when creating a macro to send it to either the environment variable TMP (there's one on every machine), or the user's MyDocuments directory, without hardcoding for a specific user? Thank you kindly. |
|
I don't know how to do this in a macro either (they are so limited I don't bother with them), but in VBA you could use: Environ("TEMP") (note: not TMP) to get the location of the Temp folder. To get the My Documents folder you have to do a bit more work. See this page:http://www.mvps.org/access/api/api0054.htm -Tom. |
#4
| |||
| |||
|
|
On Wed, 9 Jan 2008 17:05:49 -0800 (PST), John Bartley K7AAY john.bart... (AT) gmail (DOT) com> wrote: New at macros, trying to send a report to file so it will work on any machine. I can't figure out how to send to the TMP directory, or to MY DOCUMENTS without knowing the user's name... what do I put in the OutputFile box when creating a macro to send it to either the environment variable TMP (there's one on every machine), or the user's MyDocuments directory, without hardcoding for a specific user? Thank you kindly. On Jan 9, 5:35 pm, Tom van Stiphout <no.spam.tom7... (AT) cox (DOT) net> wrote: I don't know how to do this in a macro either (they are so limited I don't bother with them), but in VBA you could use: Environ("TEMP") (note: not TMP) to get the location of the Temp folder. To get the My Documents folder you have to do a bit more work. See this page:http://www.mvps.org/access/api/api0054.htm -Tom. Tom, I appreciate your response, but I am still not up to speed on Access, much less incorporating VBA into the database, so your no- doubt spot-on proposal is so over my head. Anyone know how to do this within the confines of Macros sans VBA? Thank you all kindly. |
#5
| |||
| |||
|
![]() |
| Thread Tools | |
| Display Modes | |
| |