Powerpoint VisualBasic Script

Sub active()
    With ActivePresentation
        If .Path = "" Then
            MsgBox "Please save this presentation.", vbOKOnly
        Else
            .Save
            For Each myWindow In Windows
                .Close
            Next myWindow
        End If
    End With
End Sub