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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Visual Basic in Excel to set active printer preferences

Status
Not open for further replies.

Forrest77

Technical User
Apr 5, 2006
31
US
I know how to select whatever printer I want in excel to print. However, some of my excel sheets require a different paper size. So is there a way to set printer preferences using vb code in excel.
I tried to record a Macro selecting the printer, selecting printer properties, selecting printer preferences, and then change the size. When I viewe the macro, it only shows the printer selection but not the other changes.
This is a label printer and I still have to manually change out the label roll from 4 x 6 default to 4 x 4. It looks like I will have to change the printer preferences manually also.
Thanks for any ideas
Todd
 
Have a look at the flags property for some of the things you can set (select CD on form, press F1, when help comes up select properties link at top and scroll down to Flags Property (Print Dialog), select, display). After that, you mignt want to look at the OpenPrinter and SetPrinter API's...



Good Luck

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top