【问题标题】:Document.ExportAsFixedFormat or Document.SaveAs in reverse orderDocument.ExportAsFixedFormat 或 Document.SaveAs 以相反的顺序
【发布时间】:2019-03-28 21:58:31
【问题描述】:

Word 文件是否可以在没有打印机的情况下以相反的顺序保存为 PDF?

正常运行

WD.ExportAsFixedFormat PdfFile, wdExportFormatPDF, , wdExportOptimizeForOnScreen, wdExportFromTo, 1, WD.Range.Information(wdNumberOfPagesInDocument)

但是反过来就不行了

WD.ExportAsFixedFormat PdfFile, wdExportFormatPDF, , wdExportOptimizeForOnScreen, wdExportFromTo, WD.Range.Information(wdNumberOfPagesInDocument),1

【问题讨论】:

    标签: vba pdf ms-word


    【解决方案1】:

    您可以使用 .Printout 方法反转文档中的页面,并将第一页和最后一页指定为最后一页和第一页。这是有效的,因为您正在打印到 pdf。

    ActivePrinter = "Adobe PDF"
    Application.PrintOut FileName:="", Range:=wdPrintRangeOfPages, Item:= _
            wdPrintDocumentWithMarkup, Copies:=1, Pages:="10 -1", PageType:= _
            wdPrintAllPages, Collate:=False, Background:=True, PrintToFile:=False, _
            PrintZoomColumn:=0, PrintZoomRow:=0, PrintZoomPaperWidth:=0, _
            PrintZoomPaperHeight:=0
    

    【讨论】:

    • 这个我知道,但这需要系统中安装打印机
    猜你喜欢
    • 2023-03-31
    • 1970-01-01
    • 2016-09-20
    • 2015-02-17
    • 1970-01-01
    • 1970-01-01
    • 2016-10-05
    • 2011-11-02
    • 1970-01-01
    相关资源
    最近更新 更多