SaveAs2 Method (IDocument)

SaveAs2 Method (IDocument) | Send Feedback
See Also Example

Name
  Path and file name to which to save the document

Options
  File type to which to save the document as defined in dsDocumentSaveAsOption_e

Overwrite
  True to overwrite an already existing file of the same name in the specified path, false to not

Errors[out]
  Status of saving the document as defined in dsDocumentSaveError_e

Saves the document as the specified file name and file type.

# Syntax

Visual Basic |
--- | ---
    Sub SaveAs2( _
       ByVal Name As System.String, _
       ByVal Options As dsDocumentSaveAsOption_e, _
       ByVal Overwrite As System.Boolean, _
       ByRef Errors As dsDocumentSaveError_e _
    )

C# |
--- | ---
    void SaveAs2(
       System.string Name,
       dsDocumentSaveAsOption_e Options,
       System.bool Overwrite,
       out dsDocumentSaveError_e Errors
    )

JavaScript |
--- | ---
    SaveAs2(
       Name : String,
       Options : String,
       Overwrite : Boolean
    ) : String

COM native C++ |
--- | ---
    HRESULT SaveAs2(
       BSTR Name,
       dsDocumentSaveAsOption_e Options,
       VARIANT_BOOL Overwrite,
       dsDocumentSaveError_e* Errors
    )

C++ |
--- | ---
    DSRESULT SaveAs2(
       const dsString& Name,
       dsDocumentSaveAsOption_e Options,
       bool Overwrite,
       dsDocumentSaveError_e* Errors
    )

#### Parameters

Name
  Path and file name to which to save the document
Options
  File type to which to save the document as defined in dsDocumentSaveAsOption_e
Overwrite
  True to overwrite an already existing file of the same name in the specified path, false to not
Errors[out] or Return Value
  Status of saving the document as defined in dsDocumentSaveError_e

# Example

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

# See Also

####

IDocument Interface
IDocument Members
IDocument::Save Method

# Availability

DraftSight V1R1.3