Close Method
Applies To
DocumentWindow object, Presentation object.
Description
Closes the specified document window, presentation, or open freeform drawing.
Syntax
expression.Close
expression Required. An expression that returns a DocumentWindow or Presentation object.
See Also
Quit method.
Example
This example closes all windows except the active window.
With Application.Windows
For i = 2 To .Count
.Item(2).Close
Next
End With
This example closes Pres1.ppt without saving changes.
With Application.Presentations("pres1.ppt")
.Saved = True
.Close
End With
This example closes all open presentations. If there are changes in any presentation, PowerPoint displays a message asking whether the user wants to save changes.
With Application.Presentations
For i = .Count To 1 Step -1
.Item(i).Close
Next
End With