首页 > 解决方案 > ExportAsFixedFormat 切断第二页

问题描述

我将 Excel 工作簿的工作表保存为 pdf。打印时,第二个 pdf 的第一页(“#Occupants”)为 2 页。但是,.pdf 文件会截断第二页。

我在这里想念什么?

Sub SavePDF()
    saveCensus = "\Census " & Format(Now(), "mm-dd-yy") & ".pdf"
    Sheets(Array("A BLDG", "B BLDG", "C BLDG", "SUMMARY")).Select
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ActiveWorkbook.Path & saveCensus, IgnorePrintAreas:=False

    saveSnapshot = "\Snapshot " & Format(Now(), "mm-dd-yy") & ".pdf"
    Sheets(Array("#Occupants", "Snapshot")).Select
    ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=ActiveWorkbook.Path & saveSnapshot, IgnorePrintAreas:=False
End Sub

标签: excelvba

解决方案


推荐阅读