PPT VBA: Capturing Screen Shot inside Shape

300 views Asked by At

I'm fairly new to VBA coding. I am trying to capture a photo from a slide. The photo is outlined by a rectangle. There are text boxes and arrows inside the rectangle that I am trying to capture. I know I can group the object and export the shape as the group. It would be better for my situation if it was not necessary to group the objects. The current code does save a photo of the rectangle, but not the other shapes on top of it.

Dim photoA As Variant

Set photoA = Application.ActiveWindow.View.Slide.Shapes("Rectangle 2")

With photoA
    .Export "A.jpg", ppShapeFormatJPG
End With
0

There are 0 answers