OpenDocument2 Method (IApplication)

OpenDocument2 Method (IApplication) | Send Feedback
See Also Example

Document[out]
  Document

PathName
  Path and file name of document to open

Option
  Mode in which to open the document as defined in dsDocumentOpenOption_e

EncodingId
  Encoding as defined in dsEncoding_e

Opens the specified document.

# Syntax

Visual Basic |
--- | ---
    Function OpenDocument2( _
       ByVal PathName As System.String, _
       ByVal Option As dsDocumentOpenOption_e, _
       ByVal EncodingId As dsEncoding_e _
    ) As Document

C# |
--- | ---
    Document OpenDocument2(
       System.string PathName,
       dsDocumentOpenOption_e Option,
       dsEncoding_e EncodingId
    )

JavaScript |
--- | ---
    OpenDocument2(
       PathName : String,
       Option : String,
       EncodingId : String
    ) : dsDocument

COM native C++ |
--- | ---
    HRESULT OpenDocument2(
       BSTR PathName,
       dsDocumentOpenOption_e Option,
       dsEncoding_e EncodingId,
       IDocument** Document
    )

C++ |
--- | ---
    DSRESULT OpenDocument2(
       const dsString& PathName,
       dsDocumentOpenOption_e Option,
       dsEncoding_e EncodingId,
       dsDocument** Document
    )

#### Parameters

PathName
  Path and file name of document to open
Option
  Mode in which to open the document as defined in dsDocumentOpenOption_e
EncodingId
  Encoding as defined in dsEncoding_e
Document[out] or Return Value
  Document

# Example

Fire Application and Document Events (C#)
Fire Application and Document Events (VB.NET)
Fire Application and Document Events (VBA)
Get and Set Hatch Pattern Data (C#)
Get and Set Hatch Pattern Data (VB.NET)
Get and Set Hatch Pattern Data (VBA)

# See Also

####

IApplication Interface
IApplication Members

# Availability

V1R1.3