Selecting a Printer

C

chas

Hi Charles,

what version of Access are you using? In Access 2002 you
can use the Applications Printer object and Printers
collection. You can search VBA help in Access for more
info. The following lists installed printers in the VBA
immediate window:
=====================
Sub showprntrs()

Dim prntr As Printer

For Each prntr In Application.Printers
Debug.Print prntr.DeviceName
Next

End Sub
===================

Any version of Access earlier than this requires using
code to talk to the Windows API with either PrtDevMode or
PrtMip (not very well documented). Someone may have some
sample code out there - any one?

hth

chas
 

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