Partager via


Document::Close method

The Close method closes the document.

Syntax

Document.Close( _
  ByVal SaveChanges As Long _
)

Parameters

SaveChanges

Value specifying whether changes (if any) to the document should be saved. If this parameter is 1, the document is saved before it is closed; the user will not have another opportunity to save the document, although the user will be prompted (by a user interface) to provide a file name if required. If this parameter is 0, the document is closed without being saved.

Return value

This method does not return a value.

Examples

' Save the document and close it.
objDoc.Close (1)

Requirements

Minimum supported client
Windows Vista
Minimum supported server
Windows Server 2008
Header
MMCObj.h
IDL
MMCObj.idl
DLL
Mmc.exe
IID
IID_Document

See also

Application.OnDocumentClose

Document.IsSaved

Document.Save