我正在尝试将多个范围导出到PDF并仅适合一张纸,但缺少解决此问题的属性?现在,在一个PDF上将其拆分为两个多页。
Sub Printing()
Application.PrintCommunication = False
With ActiveSheet.PageSetup
.Zoom = False
.Orientation = xlPortrait
.FitToPagesWide = 1
.FitToPagesTall = False
.PrintArea = ActiveSheet.Range("A01:R6, A26:R50").Address
End With
Application.PrintCommunication = True
fname = ThisWorkbook.Path & "\test.pdf"
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=fname, _
Quality:=xlQualityStandard, _
IgnorePrintAreas:=False, _
IncludeDocProperties:=True, _
OpenAfterPublish:=True
End Sub