Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default program to print some landscape, some portrait?


I am creating a two page device status report in Excel. VBA code will be
run to populate the fields of the report and save a the report as a file
- one for each device listed in the database (approx. 1000). It is
necessary for me to print each of these reports for our contractors,
and desireable that each two page report be printed on a single page
(front and back).

The issue is that the first page needs to print in a Portrait format,
and the second in Landscape format. Is it possible to print two pages
of the same worksheet back-to-back AND have each side in the desired
format(portrait/landscape). Any suggestions to accomplish this are
greatly appreciated.


--
honestlylion
------------------------------------------------------------------------
honestlylion's Profile: http://www.excelforum.com/member.php...o&userid=31674
View this thread: http://www.excelforum.com/showthread...hreadid=513697

  #2   Report Post  
Posted to microsoft.public.excel.programming
GS GS is offline
external usenet poster
 
Posts: 364
Default program to print some landscape, some portrait?

By "two page report" do you mean the data is on two spreadsheets, or one
spreadsheet that prints two pages in length?.

Printing both sides of a single piece of paper requires two passes (usually).

For two spreadsheets: set orientation for each sheet in PageSetup. Print
the first, then the second.

For one spreadsheet:
Assign a local Defined Name for each 'page range' of cells. (eg:
"Pg1_Print", "Pg2_Print")
Use a macro for each print pass, that sets the orientation for each range.
Run macro1, then reload the paper and run macro2.

possible coding: identical for both orientations
Sub PrintPg1() '( PrintPg2() for 2nd macro)
With ActiveSheet.Range("Pg1_Print") '( "Pg2_Print" for 2nd macro)
With .PageSetup
'set parameters how you want
.Orientation = xlPortrait '( xlLandscape for 2nd macro)
End With
'print it, OR preview it
End With
End Sub

This would be similar to selecting the range manually and choosing '
Selection ' in the Prit dialog.
Use the macro recorder and do it manually. This will give you some idea of
what code to use for PageSetup parameters. Do not include any printer
specific parameters (eg: PrintQuality) to avoid an error message if another
user has a different printer.

Hope this helps!
GS


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Orientation Landscape but want Page #s to Print Portrait vcollins Excel Discussion (Misc queries) 1 November 15th 07 11:58 PM
Print one page landscape and one portrait ndrinkwater Setting up and Configuration of Excel 0 November 13th 07 02:14 PM
Portrait/Landscape print issue honestlylion Excel Discussion (Misc queries) 1 February 17th 06 05:35 PM
Print both Portrait and Landscape - Excel Georgie77 Excel Discussion (Misc queries) 8 June 1st 05 12:18 AM
Print Landscape AND Portrait Orientation in ONE Worksheet Paul Martin[_4_] Excel Programming 1 July 16th 03 01:17 PM


All times are GMT +1. The time now is 03:09 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"