在景观中另存为PDF [英] Save as PDF in Landscape
本文介绍了在景观中另存为PDF的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何将工作簿中的多张工作表pdf转换为横向格式的pdf?这就是我所拥有的.我缺少景观语法-
How can I pdf multiple sheets in my Workbook into one pdf in landscape format? Here is what I have. I am missing the landscape syntax -
Sub CompileReport()
Sheets(Array("Sheet1", "Sheet2", "Sheet3")).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="F:\Report\Test" & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False
End Sub
谢谢!
推荐答案
尝试以下方法:
Sub CompileReport()
Dim mySheets As Variant, sh
mySheets = Array("Sheet1", "Sheet2", "Sheet3")
For Each sh In mySheets
Sheets(sh).PageSetup.Orientation = xlLandscape
Next
Sheets(mySheets).Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:="F:\Report\Test" & ".pdf", _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False
End Sub
这篇关于在景观中另存为PDF的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文