Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations cowski on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

Excel VBA and printer settings?

Status
Not open for further replies.

fporterAECI

Electrical
Joined
Oct 12, 2001
Messages
5
Location
US
Does anyone know how to change the settings of the Active Printer using VBA code? I made a "batch" worksheet printing program to print a bunch of different worksheets in a workbook auto. But when you use the .PrintOut method for printing, it uses the current settings of the active printer to print. I'm wanting to be able to change the printing resolution from 300 dpi to 600 automatically. I've tried calling up the built-in dialog (xlDialogPrint) and sending keys to it, but the problem is that while the dialog is up, my code is paused. There has to be a way to do this, even if it involves calling a Windows API function. Can anyone help?
Thanks!
 
Try inserting the line:
ActiveSheet.PageSetup.PrintQuality = 600
in the appropriate place

If the sheet being printed is assigned to an object variable, say 'Sht' then you would use:
Sht.PageSetup.PrintQuality = 600

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top