Click here to monitor SSC

Caffeine Induced Tirades about .NET and Life

Exporting PowerPoint Slides with Specific Heights and Widths

Published 29 May 2014 1:47 pm

I found myself in need of exporting PowerPoint slides from a presentation and was fairly excited when I found that you could save them off in standard image formats. The problem is that Microsoft conveniently exports all images with a resolution of 960 x 720 pixels, which is not the resolution I wanted.  You can, however, specify the resolution if you are willing to put a macro into your project:

Sub ExportSlides()
  For i = 1 To ActiveWindow.Selection.SlideRange.Count
    Dim fileName As String
    If (i > 10) Then
      fileName = "C:\PowerPoint Export\Slide" & i & ".png"
      fileName = "C:\PowerPoint Export\Slide0" & i & ".png"
    End If
    ActiveWindow.Selection.SlideRange(i).Export fileName, "PNG", 1280, 720
End Sub

When you call the Export method you can specify the file type as well as the dimensions to use when creating the image.  If the macro approach is not your thing, then you can also modify the default settings through the registry:

2 Responses to “Exporting PowerPoint Slides with Specific Heights and Widths”

  1. Wulfgar says:

    Hi Damon,

    This looks like a very handy script. Just 1 nit to pick; shouldn’t that be a ‘>’ symbol, instead of a ‘<'?

    The way it reads now, the slides numbered greater than 10 will get a leading zero.

    Otherwise, this is simple and elegant. I like it.

Leave a Reply

Blog archive