Greeting PPT gurus:

I'm working on a PPT macro to go through slides 2&3 and loop through the collection to delete the last msoPicture on the slide (the last screen shot from the night before).

This is the code I use for my report:
Sub Daily_Report()

Dim opic As Shape
Dim nn As Integer
Dim sldHeight As Single
Dim sldWidth As Single


'Setup changes for slides 2-3
For nn = 2 To 3
For Each opic In ActivePresentation.Slides(nn).Shapes
If opic.Type = msoPicture Then


With ActivePresentation.PageSetup
 sldWidth = .SlideWidth
 sldHeight = .SlideHeight
End With


'Resize and position images for curtain section
With opic
.LockAspectRatio = msoFalse
.Height = sldHeight * 0.817778
.Width = sldWidth * 0.98
.Left = sldWidth * 0.01
.Top = sldHeight * 0.017778
.ZOrder (msoSendTofront)
.Line.Weight = 1
.Line.ForeColor.RGB = RGB(99, 102, 106)
End With
Else 'do nothing
End If
Next opic
Next


'Move Line
For Each opic In ActivePresentation.Slides(2).Shapes
If opic.Type = msoLine Then
With opic
.LockAspectRatio = msoFalse
.Left = sldWidth * 0.015
.ZOrder (msoSendToBack)
.Line.Weight = 1.5
.Line.ForeColor.RGB = RGB(255, 0, 0)
End With
Else 'do nothing
End If
Next opic


'Delete old screenshot
With Application.ActivePresentation.Slides(nn).Shapes
    For intShape = .Count To 1 Step -1
        With .Item(intShape)
            If .Type = msoPicture Then .Delete
        End With
    Next
End With


'Updates links in Powerpoint
Dim osld As Slide
For Each osld In ActivePresentation.Slides
For Each opic In osld.Shapes
If opic.Type = msoLinkedOLEObject Then opic.LinkFormat.Update
Next opic
Next osld


End Sub
Currently the 'Delete old screenshot is giving me:
"Run-time error '-2147188160 (80048240)':
Slides (unkown member) : Integer out of range. 4 is not in the valid range of 1 to 3."