Link to home
Start Free TrialLog in
Avatar of Thomas Grobstein
Thomas Grobstein

asked on

VBA Powerpoint

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
ASKER CERTIFIED SOLUTION
Avatar of Jamie Garroch (MVP)
Jamie Garroch (MVP)
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Thomas Grobstein
Thomas Grobstein

ASKER

Perfect!