将每张Powerpoint幻灯片导出为单独的pdf文件 [英] Export each slide of Powerpoint to a separate pdf file
本文介绍了将每张Powerpoint幻灯片导出为单独的pdf文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我使用以下代码:
ActivePresentation.ExportAsFixedFormat ActivePresentation.Path & "" & ActivePresentation.Name & ".pdf", ppFixedFormatTypePDF, ppFixedFormatIntentPrint
此代码运行良好,但它将所有幻灯片导出到唯一的pdf文件。
推荐答案
您可以这样做: 下面的代码将创建PDF,并在当前文件夹末尾添加幻灯片编号和文件名。
Sub ExportSlidesToIndividualPDF()
Dim oPPT As Presentation, oSlide As Slide
Dim sPath As String, sExt As String
Set oPPT = ActivePresentation
sPath = oPPT.FullName & "_Slide_"
sExt = ".pdf"
For Each oSlide In oPPT.Slides
i = oSlide.SlideNumber
oSlide.Select
oPPT.ExportAsFixedFormat _
Path:=sPath & i & sExt, _
FixedFormatType:=ppFixedFormatTypePDF, _
RangeType:=ppPrintSelection
Next
Set oPPT = Nothing
End Sub
这篇关于将每张Powerpoint幻灯片导出为单独的pdf文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文