Good morning all! Is there a way to search for specific text in one slide, and based on whether or not it finds something, it runs a macro?

My example:
When I create my reports, if the first slide has the specific "Name" in any TextBox/TextPlaceHoler, then Slide 4 has to have a specific picture size and position. I tried using the code below, but keep getting an error:
Run-time error '91':
Object variable or With block variable not set

Dim oSld As SlideDim oShp As Shape
Set oSld = ActivePresentation.Slides(1)
For Each oShp In oSld.Shapes
If oShp.HasTextFrame Then
If oShp.TextFrame.TextRange.Find("Name") Then
'Nothing found
Else
'Found text
For Each opic In ActivePresentation.Slides(4).Shapes
If opic.Type = msoPicture Then
With opic
.LockAspectRatio = msoFalse
.Height = 306.72
.Width = 195.12
.Left = 409.68
.Top = 40.32
.ZOrder (msoSendBackward)
.Line.Weight = 1
.Line.ForeColor.RGB = RGB(99, 102, 106)
End With
Else
End If
Next opic
Exit Sub
End If
End If
Next oShp
Thanks a lot!