troubleshooting Question

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

Avatar of mkacos
mkacosFlag for United States of America asked on
Microsoft AccessMicrosoft Development
7 Comments1 Solution1057 ViewsLast Modified:
This is a good solution ( 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?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 7 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 7 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros