Hello everyone! I have a worksheet with 5 pages. One of them I want to export in landscape format. It's the third page.
Here are the ranges:
B1:K69 -> Portrait (Pages 1-2)
B70:P115 -> Landscape (Page 3)
B116:K215 -> Portrait (Pages 4-5)
At moment, I can export it all as portrait using this code:
But when I use this code, at the third page, I'm losing information, that could be seen if the orientation was setted to Landscape format. Also it's exporting one blank page (page number six).
That's all, thank you!
Here are the ranges:
B1:K69 -> Portrait (Pages 1-2)
B70:P115 -> Landscape (Page 3)
B116:K215 -> Portrait (Pages 4-5)
At moment, I can export it all as portrait using this code:
Code:
Sub ExportPDF()
Application.ScreenUpdating = False
Worksheets("PDF").Visible = True
Sheets("PDF").ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
ActiveWorkbook.Path & "\" & Sheets("PDF").Range("B1") & ".pdf", Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:= _
True
Worksheets("PDF").Visible = False
Application.ScreenUpdating = True
End Sub
But when I use this code, at the third page, I'm losing information, that could be seen if the orientation was setted to Landscape format. Also it's exporting one blank page (page number six).
That's all, thank you!