View Single Post
 
Old 03-01-2012, 12:42 AM
JohnWilson JohnWilson is offline Windows 7 64bit Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,913
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

The first macro will delete any instance of the name found the second only on selected slides.

Code:
Sub delete_all()
Dim shpname As String
Dim osld As Slide
Dim i As Integer
shpname = "the name"
On Error Resume Next
For Each osld In ActivePresentation.Slides
osld.Shapes(shpname).Delete
Next osld
End Sub

Sub deleteFrom_Sel()
Dim shpname As String
Dim osld As Slide
Dim i As Integer
shpname = "the name"
On Error Resume Next
For Each osld In ActiveWindow.Selection.SlideRange
osld.Shapes(shpname).Delete
Next osld
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote