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!

Setting the paper orientation for the default printer

Status
Not open for further replies.

shabnam

Programmer
Oct 3, 2000
26
0
0
US
Hi,
I need to print from VB and I want to set the paper orientation to Landscape. I cannot use the windows print dialog control. So to set the orientation I use the code

Printer.Orientation = vbPRORLandscape

But it still prints in potrait which is the default setting for the printer.
 

This doesn't work for you?

Printer.Orientation = vbPRORLandscape
Printer.print "Hello"
Printer.enddoc
 
That piece of code does work. But the problem is that I am using a third party control which brings up the windows print dialog. But even if I set the paper orientation before calling the function that displays the dialog, the dialog always shows the default printer orientation and not the changed one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top