Consulting

Results 1 to 3 of 3

Thread: VBA to save all Smartart as images

  1. #1

    Exclamation VBA to save all Smartart as images

    Hello,

    I am at the end of my rope trying to figure a way to export many PowerPoint files so that they can be used on a web application. I have tried to automate the process by exporting to HTML, (using both PP/Windows and online convertors) but it is not giving me exactly what I need. I need to be able to replicate the process of right-clicking on a smart art element and saving it as an image. Ideally this will all be saved with file names according to their slide number.

    slide1-image1.png
    slide1-image2.png
    slide2-image1.png

    Is there a VBA script that can do this? I need all the background elements and text in the SmartArt as one flat image.

    THANK YOU TO ANYONE WHO CAN HELP!!

  2. #2
    Bumping - any thoughts on a VBA to export all smart art as images?

  3. #3
    VBAX Master
    Joined
    Feb 2007
    Posts
    2,093
    Location
    I'm on a plane so you will need to work on this but here's the basis

    
    
    Sub ex_SA()
    Dim oshp As Shape
    Dim osld As Slide
    For Each osld In ActivePresentation.Slides
    For Each oshp In osld.Shapes
    If oshp.Type = msoSmartArt Then
    Call oshp.Export(Environ("USERPROFILE") & "\Desktop\Slide " & _
    CStr(osld.SlideIndex) & " " & CStr(oshp.Name) & ".Png", ppShapeFormatPNG)
    End If
    Next
    Next
    End Sub
    John Wilson
    Microsoft PowerPoint MVP
    Amazing Free PowerPoint Tutorials
    http://www.pptalchemy.co.uk/powerpoi...tutorials.html

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •