I'm trying to run through a huge PowerPoint file and I want to change certain TextBoxes fonts on each slide (not every slide has the textbox) however I keep getting an error when it can't be found on a slide (which is fine I just want it to skip to the next slide and check and change if necessary) How would I fix this please?
Sub ChangeIndividualFonts()
Dim bpFontName As String
bpFontName = "Arial"
With ActivePresentation
For Each Slide In .Slides
For Each Shape In Slide.Shapes
With Slide.Shapes("TextBox 5")
If .HasTextFrame Then
If .TextFrame.HasText Then
.TextFrame.TextRange.Font.Name = bpFontName
End If
End If
End With
Next
Next
End With
End Sub