如何使用横向方向发布pdf

时间:2014-05-29 15:42:39

标签: vba

我一直在尝试从Excel工作表中发布.pdf文件

    Selection.ExportAsFixedFormat _
    Type:=xlTypePDF, _
    Filename:="C:\TestFolder\temp.pdf", _
    Quality:=xlQualityStandard, _
    IncludeDocProperties:=True, _
    IgnorePrintAreas:=False, _
    OpenAfterPublish:=True , _
    Orientation:=xlLandscape

然而,最后一行不符合我的预期?

如何发布面向格局的pdf?

1 个答案:

答案 0 :(得分:1)

看起来“Orientation”不是ExportAsFixedFormat的参数(参见库参考here)。

我建议首先使用以下内容在所选工作表上设置页面方向:

ActiveSheet.PageSetup.Orientation = xlLandscape