Changing Default Printer in code

K

Ken

Hi,

Is there any way to change the default printer in code?
I've seen some options, but they require opening a report
in design view, which is not possible for me, as I am
working with an MDE.

Thanks,

Ken
 
S

SA

Ken:

If you are using versions of Access prior to Access Xp, then you've got to
use api calls to do this. Look in either MSDN or the Microsoft
Knowledgebase for many articles on this. If you are using Access Xp or
above then you can use the Application.printers collection to pick the
default printer to use and set that into the Application.printer.

If you don't want to code this all out, you might take a look at our "On the
Fly Printing" classes which do support MDE dbs. You'll find them on our
web.

HTH
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top