Avatar of Michael Kacos
Michael Kacos
Flag 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/Microsoft/Development/MS_Access/Q_27056617.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?
Microsoft AccessMicrosoft Development

Avatar of undefined
Last Comment
Jeffrey Coachman

8/22/2022 - Mon
Jeffrey Coachman

Michael Kacos

Boag2000 - I am trying to print an exteral file to a printer not a report.  
Jeffrey Coachman

Ooops, sorry...

I say a way to do this once...

An expert should be along with the code shrortly
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
Jeffrey Coachman

Michael Kacos

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
Michael Kacos

This is a work around not a real solution.
Jeffrey Coachman

<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)


Get an unlimited membership to EE for less than $4 a week.
Unlimited question asking, solutions, articles and more.