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:

Copy to clipboard
PHP Code: 
Sub ExportPDF()


Application.ScreenUpdating False
Worksheets
("PDF").Visible True
    Sheets
("PDF").ExportAsFixedFormat Type:=xlTypePDFFilename:= _
        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). In fact, everything is fitted in PDF, but this range L81:Q103 is unseen! It's represents 6 columns out of page.


That's all, thank you!