CloseDocument Method (IApplication)

CloseDocument Method (IApplication) | Send Feedback
See Also Example

PathName
  Path and file name of the document to close

SaveChanges
  True to save the changes made to the specified document, false to discard the changes

Closes the specified document.

# Syntax

Visual Basic |
--- | ---
    Sub CloseDocument( _
       ByVal PathName As System.String, _
       ByVal SaveChanges As System.Boolean _
    )

C# |
--- | ---
    void CloseDocument(
       System.string PathName,
       System.bool SaveChanges
    )

JavaScript |
--- | ---
    CloseDocument(
       PathName : String,
       SaveChanges : Boolean
    )

COM native C++ |
--- | ---
    HRESULT CloseDocument(
       BSTR PathName,
       VARIANT_BOOL SaveChanges
    )

C++ |
--- | ---
    DSRESULT CloseDocument(
       const dsString& PathName,
       bool SaveChanges
    )

#### Parameters

PathName
  Path and file name of the document to close
SaveChanges
  True to save the changes made to the specified document, false to discard the changes

# Example

Fire Application and Document Events (C#)
Fire Application and Document Events (VB.NET)
Fire Application and Document Events (VBA)

# See Also

####

IApplication Interface
IApplication Members
IApplication::GetActiveDocument Method
IApplication::GetDocuments Method
IApplication::OpenDocument Method

# Availability

DraftSight V1R1