Link to home
Start Free TrialLog in
Avatar of Michael Kacos
Michael KacosFlag for United States of America

asked on

More Help on Printing an External File within Access VBA (2003)

This is a good solution (https://www.experts-exchange.com/questions/27056617/Print-File-from-VBA.html) but I also need to know how to select the actual printer is is going to.  I have tons of TIF files that I need to convert to PDF (thanks MSFT for dropping tif).  I have purchased a printer driver from CutePDF that I use in my Access VBA code that will print anything to a PDF.

In Access VBA, I can set the printer to Auto PDF (it shows as an installed printer) then I can print an Access report to Auto PDF.  I have tried the following with the API call with no luck: ShellExecute(Application.hWndAccessApp, "print /D:Auto PDF", WrkFileName, "", "", 0).  I receive "Unable to initialize device Auto PDF" then I replace that with CPWPT185: (which is trhe port assigned to this print device) and I get the same error.

Is there a way to direct the API to a specific printer that is installed on the system?
Avatar of Jeffrey Coachman
Jeffrey Coachman
Flag of United States of America image

Avatar of Michael Kacos

ASKER

Boag2000 - I am trying to print an exteral file to a printer not a report.  
Ooops, sorry...

I say a way to do this once...

An expert should be along with the code shrortly
ASKER CERTIFIED SOLUTION
Avatar of Michael Kacos
Michael Kacos
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
This is a work around not a real solution.
<This is a work around not a real solution.>
If a "Workarond" fixes your issue then it IS Solution, AFAIC.
So congrats on finding your own solution.
;-)

(Just be aware that many machines do not have MSFT Document Imaging installed)

JeffCoachman