Controlling a printer from VBA

M

Mac

Dear All,

I have a module that carries out various end of month procedures for
me, part of this includes printing a number of reports. Because some of

the reports are external I need to print them on headed paper in a
seperate tray from the blank A4 paper. Is there a way to instruct the
printer from within my module to use the approipriate trays, for
example, the headed A4 is tray 4 (printerCaps class advises that it's
been assigned the value 256 which I think may be a problem in and of
itself). I'm using an HP 5100dtn and Access 2003 on an XP SP2, could
any of this have a bearing on how the instrutions are being
interpreted?

TIA

Andy

DoCmd.OpenReport "DD/SO - Cover Letter", , , , acHidden
With Reports("DD/SO - Cover Letter").Printer
..PaperBin = 11
End With
 
G

Guest

Mac,

I haven't tried controlling the printer from Access, but it is pretty easy
from Excel. I suggest that you record an Excel macro that sets up the print
job the way you want it, and paste the code into your Access VBA code.
 

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