×
INTELLIGENT WORK FORUMS
FOR ENGINEERING PROFESSIONALS

Log In

Come Join Us!

Are you an
Engineering professional?
Join Eng-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Eng-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Excel VBA and printer settings?

Excel VBA and printer settings?

Excel VBA and printer settings?

(OP)
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!

RE: Excel VBA and printer settings?

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

RE: Excel VBA and printer settings?

(OP)
okay, I'll try that thanks!!

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Eng-Tips Forums free from inappropriate posts.
The Eng-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Eng-Tips forums is a member-only feature.

Click Here to join Eng-Tips and talk with other members!


Resources