Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
code to parse a multi-colum multi-select listbox | Excel Programming | |||
Get header only on first page of multi page excel file | Excel Discussion (Misc queries) | |||
Printer orientation with multi pages | Excel Programming | |||
how can I paste multi-line/multi-paragraph data into ONE cell? | Excel Discussion (Misc queries) | |||
Extract values from a multi-select multi-column list-box | Excel Programming |