Sub zaphidden()
Dim i As Integer
For i = ActivePresentation.Slides.Count To 1 Step -1
If ActivePresentation.Slides(i) _
..SlideShowTransition.Hidden = True Then
ActivePresentation.Slides(i).Delete
End If
Next i
End Sub
To unhide them substitute
ActivePresentation.Slides(i).SlideShowTransition.Hidden=False
where it says
ActivePresentation.Slides(i).Delete