Use the Save method to save a presentation before closing its last window : ActivePresentation « PowerPoint « VBA / Excel / Access / Word






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

 








Related examples in the same category

1.Working with the Active Presentation
2.Closing a Window
3.Check the Path property of the Presentation object before using the Save method if you need to determine whether the presentation has been saved
4.Saving a Copy of a Presentation