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
VBAMicrosoft PowerPoint

Avatar of undefined
Last Comment
Thomas Grobstein

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Jamie Garroch (MVP)

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Thomas Grobstein

ASKER
Perfect!
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck