Use the Save method to save a presentation before closing its last window
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