close up of a keyboard

Remove shadow from all labels

I needed a quick and dirty solution for removing all labels in all slides in Microsoft PowerPoint presentation. CoPilot has come with the following code:

Sub NoTextShadows()
    Dim oSld As Slide
    Dim oShp As Shape

    For Each oSld In ActivePresentation.Slides
        For Each oShp In oSld.Shapes
            If oShp.HasTextFrame Then
                If oShp.TextFrame.HasText Then
                    oShp.TextFrame.TextRange.Font.Shadow = msoFalse
                    oShp.Shadow.Visible = msoFalse
                End If
            End If
        Next oShp
    Next oSld
End Sub

You need to add it as macro and therefore save your presentation in .pptm format.

Leave a Reply