LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 33
Default Printing multi-page and multi-orientation excel tab to PDF

Could someone let me know if it is possible to print a multi-page tab in
Excel to a PDF with multiple page orientations? Currently, I am setting the
print area for each of the four pages and then printing each page seperatly
to a PDF. Once complete I am combining each page into one PDF. I need all
pages to print to one PDF with the proper size and orientation.

My code is included below.

Thank you in adavance for your help,

Joe M


Private Sub CommandButton2_Click()

ans = MsgBox("Do you want to Export the Input page to PDF?", vbYesNo,
"Confirmation")
If ans = vbYes Then

Sheets("Input").Select
Sheets("Input").Activate
Application.ActivePrinter = "Adobe PDF on Ne01:"
ActiveWindow.SelectedSheets.PrintOut Copies:=1, ActivePrinter:= _
"Adobe PDF on Ne01:", Collate:=True
Sheets("Input").Select

Sheets("Input").Select
Sheets("Input").Activate

'Prints Page 1 of Input tab
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

Range("AssumptionsPrintArea").PrintOut

'Prints Page 2 of Input tab
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

Range("EquityPrintArea").PrintOut

'Prints Page 3 of Input tab
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

Range("RentAndExpensePrintArea").PrintOut

'Prints Page 4 of Input tab
With ActiveSheet.PageSetup
.Orientation = xlPortrait
.PaperSize = xlPaperLegal
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 1
End With

Range("SourcesUsesPrintArea").PrintOut

'resets the Page Setup to landscape and 4 pages long.
With ActiveSheet.PageSetup
.Orientation = xlLandscape
.PaperSize = xlPaperLegal
.Zoom = False
.FitToPagesWide = 1
.FitToPagesTall = 4
End With

End If

End Sub

 
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
code to parse a multi-colum multi-select listbox Jade Excel Programming 1 September 16th 08 03:47 PM
Get header only on first page of multi page excel file betwms Excel Discussion (Misc queries) 3 March 29th 06 05:47 PM
Printer orientation with multi pages skuzapo Excel Programming 4 February 21st 06 11:35 PM
how can I paste multi-line/multi-paragraph data into ONE cell? Theano Excel Discussion (Misc queries) 3 June 7th 05 01:10 PM
Extract values from a multi-select multi-column list-box Peter[_20_] Excel Programming 5 September 28th 03 04:04 PM


All times are GMT +1. The time now is 02:08 AM.

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"