We help IT Professionals succeed at work.

VBA Powerpoint

221 Views
Last Modified: 2017-03-07
Hey Community,

I need a VBA Code that selects  and then deletes all shapes in a PowerPoint file that do not contain any text(/words).

I tried this Code:

Private Sub Test()

Dim sShapes As Shape

For Each sShapes In ActivePresentation.Slides.Range("SlideNamexxx")
If Not sShapes.TextFrame Is Nothing Then
sShapes.Delete
Next sShapes
End If
End Sub

The basic idea is that I ungrouped a smart art and would like to deleted the shapes in which I didn't write any text.


Thanks in Advance

Thomas
Comment
Watch Question

PowerPoint Technical Consultant
CERTIFIED EXPERT
Commented:
This problem has been solved!
(Unlock this solution with a 7-day Free Trial)
UNLOCK SOLUTION

Author

Commented:
Perfect!