Setting printing properties

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I just purchased a new Laserjet 1320tn printer and would like to know if
anyone knows how to access the printer properties thru VBA. I run various
VBA macros when printing reports from several worksheets and would like to be
able to turn duplex printing on and/or off as well as select which tray I'm
pringing from.

All I can find in the VBA help is the ActivePrinter which I use to select
the printer I want to use and ActiveWindow.SelectedSheets.Printout to set
some options (copies, collate, etc.).

Any help would be greatly apprecitaed.

Carl White
 
VB provides a printer object, but VBA does not, so you are pretty much stuck
with 3 options

1) Sendkeys (simulate keystroking a choice in the print setup dialog)
2) Create another instance of the printer with the proper settings in the
windows control panel, and select that.
3) Using the Window API to interact with the printer

This article will give some insights into the 3rd method:
http://msdn.microsoft.com/archive/e...umControllingYourPrinterinMicrosoftAccess.asp

The article is about access, but the API portions of the article are the
same.

Here are some other related articles:
http://support.microsoft.com/default.aspx?scid=kb;en-us;230743
HOWTO: Set Duplex Printing for Word Automation

http://support.microsoft.com/default.aspx?scid=kb;en-us;190218
HOWTO: Retrieve Settings From a Printer Driver

http://support.microsoft.com/default.aspx?scid=kb;en-us;180645
FIX: Cannot Change Page Settings During Print Job

http://support.microsoft.com/default.aspx?scid=kb;en-us;266767
HOWTO: Set Which Printer Is the System Default Printer
 
Tom -

Thanks for the links to the articles. I'll read through them and pull out
what I can use. Thanks for the help.

Carl White
 

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

Similar Threads

Printing Macro 4
print zoom 1
changing and re-setting the default printer 2
VBA - Active Printer Port Problem 3
Print to PDF format 4
Printing Macro 1
Printing 2
Print with paper from a specific printer-tray 6

Back
Top