我需要改变这个“保存为pdf”代码为景观和合法的大小。
下面是我当前的代码:
Sub SavePDF()
Dim sFile As String
sFile = Application.DefaultFilePath & "\" & _
ActiveWorkbook.Name & ".pdf"
ActiveSheet.PageSetup.PrintArea = "A1:K27"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=sFile, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub发布于 2020-02-08 02:29:30
Sub SavePDF()
Dim sFile As String
ActiveSheet.PageSetup.Orientation = xlLandscape
sFile = Application.DefaultFilePath & "\" & _
ActiveWorkbook.Name & ".pdf"
ActiveSheet.PageSetup.PrintArea = "A1:K27"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=sFile, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub如果这还不够,则返回You can check a similar solution here
https://stackoverflow.com/questions/60117449
复制相似问题