Vba ExportAsFixedFormat上的编译错误-使用PpFixedFormatIntent参数(将PowerPoint另存为PDF)

Vba ExportAsFixedFormat上的编译错误-使用PpFixedFormatIntent参数(将PowerPoint另存为PDF),vba,powerpoint,Vba,Powerpoint,使用Excel VBA(office 365)脚本,我创建了一个带有一张幻灯片的PowerPoint 要将此PPT另存为PDF,我使用: objpres.ExportAsFixedFormat Myfile,FixedFormatType:=2,RangeType:=3 为了提高分辨率,我添加了参数PpFixedFormatIntent:=2: objpres.ExportAsFixedFormat Myfile,FixedFormatType:=2,RangeType:=3,PpFixedF

使用Excel VBA(office 365)脚本,我创建了一个带有一张幻灯片的PowerPoint

要将此PPT另存为PDF,我使用:

objpres.ExportAsFixedFormat Myfile,FixedFormatType:=2,RangeType:=3
为了提高分辨率,我添加了参数PpFixedFormatIntent:=2:

objpres.ExportAsFixedFormat Myfile,FixedFormatType:=2,RangeType:=3,PpFixedFormatIntent:=2
我明白了

编译错误:找不到命名参数

激活的引用


参数名为Intent而不是ppFixedFormatIntent。我没有发现以下代码有任何问题:

ActivePresentation.ExportAsFixedFormat "c:\PresentationPDF.pdf", _
    ppFixedFormatTypePDF, Intent:=2
这也适用于:

  ActivePresentation.ExportAsFixedFormat "c:\PresentationPDF.pdf", _
    ppFixedFormatTypePDF, ppFixedFormatIntentPrint

RangeType参数不是必需的。

参数名称是Intent而不是ppFixedFormatIntent。我没有发现以下代码有任何问题:

ActivePresentation.ExportAsFixedFormat "c:\PresentationPDF.pdf", _
    ppFixedFormatTypePDF, Intent:=2
这也适用于:

  ActivePresentation.ExportAsFixedFormat "c:\PresentationPDF.pdf", _
    ppFixedFormatTypePDF, ppFixedFormatIntentPrint
RangeType参数不是必需的