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

change settings to default printer by code

Status
Not open for further replies.

stx

Programmer
Sep 24, 2002
62
BE
Hi

is it possible to change for example the page-orientation of the default-printer (or another printer) to landscape?

My problem is that i want to send a txt-file to the printer without using the common dialog control and it must be printed in landscape.

Basically this is what i want: change de default printer setting from portrait to landscape by code, send some files to the printer and then reset the printer's page-orientation to portrait.

Is this possible.
Any thoughts are welcome.

thnx
 
To set the default printer's orientation to landscape, use the following line of code:

Printer.Orientation = vbPRORLandscape

Send your documents to the printer, then change the orientation back to portrait with the following line of code:

Printer.Orientation = vbPRORPortrait
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top