Layout footers - VBA

H

Hamilton White

Anyone know a routine for deleting all footers from the master and layouts?
Whatever I do, the footers in the layouts persist.
 
H

Hamilton White

Hi,

Yes - 2007 - should have stated that. I can get the footers to delete in the
Master but the 'sub' layouts remain the same.
 
H

Hamilton White

Hi,

Thanks for the interest in this. My code, for what it's worth, is below. I
can't even delete all footers from the Menu bar buttons - the only way is to
scroll through each layout and delete manually.

Sub DeleteFooters()
Dim oSld As Slide, oShp As Shape
On Error Resume Next

For Each oSld In ActivePresentation.Slides

For Each oShp In oSld.Shapes
If oShp.Type = msoPlaceholder Then
If oShp.PlaceholderFormat.Type = ppPlaceholderFooter Then
oShp.Delete
End If
End If
Next oShp
Next oSld


End Sub

Sub DeleteMasterFooter()
Dim oSh As Shape
Dim oSl As Slide
On Error GoTo ErrorHandler

For Each oSh In ActivePresentation.SlideMaster.Shapes
If oSh.Type = msoPlaceholder Then
If oSh.PlaceholderFormat.Type = ppPlaceholderFooter Then
oSh.Delete
End If
End If
Next oSh

Exit Sub

ErrorHandler:

Debug.Print err.Description

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top