PresentationDocument.Open Method (String, Boolean)

This content is outdated and is no longer being maintained. It is provided as a courtesy for individuals who are still using these technologies. This page may contain URLs that were valid when originally published, but now link to sites or pages that no longer exist.

Creates a new instance of the PresentationDocument class from the specified file.

Namespace:  DocumentFormat.OpenXml.Packaging
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)

Syntax

'Declaration
Public Shared Function Open ( _
    path As String, _
    readWriteMode As Boolean _
) As PresentationDocument
'Usage
Dim path As String
Dim readWriteMode As Boolean
Dim returnValue As PresentationDocument

returnValue = PresentationDocument.Open(path, readWriteMode)
public static PresentationDocument Open(
    string path,
    bool readWriteMode
)

Parameters

  • path
    Type: System.String
    Specifies the path and file name of the target Package for the OpenXmlPackage.
  • readWriteMode
    Type: System.Boolean
    Specifies the ReadWrite mode. False for Read only mode.

Return Value

Type: DocumentFormat.OpenXml.Packaging.PresentationDocument
Returns a new instance of PresentationDocument.

Exceptions

Exception Condition
ArgumentNullException

Throws an exception when path is null reference.

OpenXmlPackageException

Throws an exception when the package is not valid Open XML PresentationDocument.

See Also

Reference

PresentationDocument Class

PresentationDocument Members

Open Overload

DocumentFormat.OpenXml.Packaging Namespace