Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations waross 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
Oct 12, 2001
5
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!
 
Replies continue below

Recommended for you

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