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

Dual Printer Orientations on the Same Page

Status
Not open for further replies.

estatefacts

Programmer
May 22, 2002
11
0
0
US
I am trying to write a segment of code that will allow me to print both vertically and horizontially on the same page. When I include the code:

Printer.Orientation = vbPRORLandscape <=== Debug Error here
Printer.CurrentX = 5040
Printer.FontItalic = True
Printer.Print &quot;Best Method&quot;
Printer.FontItalic = False
Printer.Orientation = vbPRORPortrait

I get the message:

Orientation property cannot be set within a page (Error 396) Certain properties of the Printer object can't be changed within a page. This error has the following cause and solution:

You tried to change the Height, Width, or PaperSize properties of the Printer object before advancing the print job to the next page.Use the NewPage method before changing the Height, Width, or PaperSize properties

Is there any way around this?
 
sorry -- you'll get the error. i ran into the same problem when printing from within the program.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top