Public Sub PDF()
With ActiveSheet.PageSetup
.CenterHeader = "Sample Excel File Saved As PDF"
.Orientation = xlLandscape
.PrintArea = "$A$1:$AY$100"
'.PrintArea = ActiveSheet.UsedRange
.PrintTitleRows = ActiveSheet.Rows(5).Address
.Zoom = False
.FitToPagesTall = False
.FitToPagesWide = 1
End With
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:="Sample Excel File Saved As PDF 2", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=False, _
IgnorePrintAreas:=False, _
from:=1, _
To:=5, _
OpenAfterPublish:=True
End Sub
VBA Outlook KPI Excel Alt+F11 Dashboards Macros Recording Graphs Automation Developer WaterFall Powerpoint Charts Pivot Tables Forecast Charts