Print Linked Doc from Macro (1 Viewer)

Pianoman29

New member
Local time
Today, 15:02
Joined
May 6, 2015
Messages
3
I'm working in 2003 (still) and have a macro to print the selected form the user has on their screen. I need this same macro to also print a PDF in a particular network folder or just exit if the PDF doesn't exist. I've tried RunSQL with "PrintDoc [Link2PDF]" as the argument. I've tried RunApp with "AcroRd32.exe /t [Link2PDF]" as the argument but neither one works. The RunApp line will open the Adobe reader but nothing more. I'm not experienced with VB so tend to avoid it - hence the use of macros. Does anyone with the Macro or VB knowledge know how to do this?
 

Pianoman29

New member
Local time
Today, 15:02
Joined
May 6, 2015
Messages
3
Thanks for the speedy reply but I don't need to generate a PDF, I need to print an existing PDF from within the macro. The PDF doc has the name of the contents of the form field [Link2PDF] so it also involves passing the field name. Most of the time the PDF will not exist so I need it to just exit.
 

AccessBlaster

Registered User.
Local time
Today, 12:02
Joined
May 22, 2010
Messages
5,825
I think you still need the .dll files because you are using a version of access (2003) that does not support PDF printing.
 

vbaInet

AWF VIP
Local time
Today, 19:02
Joined
Jan 22, 2010
Messages
26,374
Ok, printing a pdf isn't exactly related to VBA. The Adobe suite should offer command line parameters for printing a pdf so to execute that command you can use VBA's Shell() function.

And to check if the file exists use the Dir() function.
 

Users who are viewing this thread

Top Bottom