我一直在尝试从Excel工作表中发布.pdf
文件
Selection.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:="C:\TestFolder\temp.pdf", _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True , _
Orientation:=xlLandscape
然而,最后一行不符合我的预期?
如何发布面向格局的pdf?
答案 0 :(得分:1)
看起来“Orientation”不是ExportAsFixedFormat的参数(参见库参考here)。
我建议首先使用以下内容在所选工作表上设置页面方向:
ActiveSheet.PageSetup.Orientation = xlLandscape