Convert PPT into JPG/PNG on windows

后端 未结 1 1118
耶瑟儿~
耶瑟儿~ 2021-01-29 02:15

I would like to convert a ppt presentation in a collection of images, one per each slide, programmatically in a windows environment.

I tried to modify the following code

相关标签:
1条回答
  • 2021-01-29 02:44

    Don't use .ExportAsFixedFormat. Instead, either use .SaveAs or use the .Export method on each slide.

    .Export gives you far more control. In VBA, you'd do like so:

    Dim oSl As Slide
    Dim lWidthInPixels As Long
    Dim lHeightInPixels As Long
    
    lWidthInPixels = 1024
    lHeightInPixels = 768
    
    For Each oSl In ActivePresentation.Slides
        oSl.Export "c:\path\myfile" & Format(oSl.SlideIndex, "0000") & ".jpg", _
            "JPG", _
            lWidthInPixels, _
            lHeightInPixels
    Next
    
    0 讨论(0)
提交回复
热议问题