Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Macro Output to Pdf to Folder

Status
Not open for further replies.

pattyjean

Technical User
Mar 3, 2006
53
US
I have a few reports in access that I created a macro to run the reports and save them to a folder on my computer. The problem is that I am now going to share the output macro with others that might have a different directory then me but access to the same folder.

Example
MY DIRECTORY
Y:OUTPUT/REPORT1.PDF
THEIR DIRECTORY
M:OUTPUT

How can I write it to find the output folder no matter what the letter is?
 
Hallo,

If the output is going to a server you could use the:
\\computer\share syntax

- Frink
 
do I add the folder name?

\\computer\share syntax\Output\file name.pdf
 
Hallo,

The share name is the same as you'd use to map a network drive in Windows Explorer.

Find out what your Y drive is mapped to. This could be quite tricky, but if it is displayed as:
AAA on 'BBB' (Y:)
in Windows Explorer then BBB could be the computer name and AAA could be the share name.
I say could, as it can be renamed to anything.
Try entering \\BBB\AAA into the Start> Run prompt.

If this works, \\BBB\AAA can be used instead of Y:
Because you use Y:\OUTPUT\REPORT1.PDF,
try \\BBB\AAA\OUTPUT\REPORT1.PDF

If it doesn't work, i.e. your network drive has been renamed, you'll have to ask your IT people what your Y drive is connected to.

Hope that helps,

-Frink
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top