How do I export multiple objects and groups as individual PNGs all at once in PPT?

Rapha R 20 Reputation points
2023-08-07T09:08:18.4666667+00:00

This might be a silly question but I couldn't find anywhere after a few days researching the internet. I need to export every single object (shapes, texts boxes, images, grouped objects) as individual PNG files. I don't want to spend a huge amount of time right clicking one by one and saving as PNG, since I'll need to do it often in the future.

Is there a macro or Add In that could help me? (could be either on Mac or Windows)

Thanks

PowerPoint
PowerPoint
A family of Microsoft presentation graphics products that offer tools for creating presentations and adding graphic effects like multimedia objects and special effects with text.
310 questions
PowerPoint Management
PowerPoint Management
PowerPoint: A family of Microsoft presentation graphics products that offer tools for creating presentations and adding graphic effects like multimedia objects and special effects with text.Management: The act or process of organizing, handling, directing or controlling something.
232 questions
0 comments No comments
{count} votes

Accepted answer
  1. AllenXu-MSFT 21,211 Reputation points Microsoft Vendor
    2023-08-08T02:42:19.01+00:00

    Hi @Rapha R ,

    To export multiple objects and groups as individual PNGs in PowerPoint, you can use a macro. Here are the steps to create a macro that will export each object as an individual PNG file:

    1. Open the PowerPoint presentation that contains the objects you want to export.
    2. Press "Alt + F11" to open the Visual Basic Editor.
    3. In the new module, paste the following code:
    Sub ExportShapesAsPNGs()
        Dim sld As Slide
        Dim shp As Shape
        Dim path As String
        Dim name As String
        Dim i As Integer
    
        path = "C:\Users\Username\Desktop\"
    
        For Each sld In ActivePresentation.Slides
            For Each shp In sld.Shapes
                If shp.Type <> msoPlaceholder Then
                    i = i + 1
                    name = shp.Name & ".png"
                    shp.Export path & name, ppShapeFormatPNG
                End If
            Next shp
        Next sld
        MsgBox i & " shapes exported as PNGs."
    End Sub
    
    1. Change the "path = "C:\Users\Username\Desktop\" variable to the folder where you want to save the PNG files.
    2. Press "F5" or click "Run" to run the macro. The macro will export each object as an individual PNG file in the folder you specified.

    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


1 additional answer

Sort by: Most helpful
  1. Rapha R 20 Reputation points
    2023-08-08T08:55:20.23+00:00

    Hi AllenXu-MSFT, thanks for your response. Apparently it worked but I'm not able to locate the files to check if they came out as expected. I changed the path as instructed , but when I go to the chosen folder the files are not there. Any ideas where they might have gone to? Thanks


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.