Share via


PresentationDocument.Open Method

Definition

Overloads

Open(String, Boolean, OpenSettings)

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

Open(Stream, Boolean, OpenSettings)

Creates a new instance of the PresentationDocument class from the IO stream.

Open(String, Boolean)

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

Open(Package, OpenSettings)

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

Open(Package)

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

Open(Stream, Boolean)

Creates a new instance of the PresentationDocument class from the IO stream.

Open(String, Boolean, OpenSettings)

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

public static DocumentFormat.OpenXml.Packaging.PresentationDocument Open (string path, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);
static member Open : string * bool * DocumentFormat.OpenXml.Packaging.OpenSettings -> DocumentFormat.OpenXml.Packaging.PresentationDocument
Public Shared Function Open (path As String, isEditable As Boolean, openSettings As OpenSettings) As PresentationDocument

Parameters

path
String

The path and file name of the target PresentationDocument.

isEditable
Boolean

In ReadWrite mode. False for Read only mode.

openSettings
OpenSettings

The advanced settings for opening a document.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "path" is null reference.

Thrown when the package is not valid Open XML PresentationDocument.

Thrown when specified to process the markup compatibility but the given target FileFormatVersion is incorrect.

Applies to

Open(Stream, Boolean, OpenSettings)

Creates a new instance of the PresentationDocument class from the IO stream.

public static DocumentFormat.OpenXml.Packaging.PresentationDocument Open (System.IO.Stream stream, bool isEditable, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);
static member Open : System.IO.Stream * bool * DocumentFormat.OpenXml.Packaging.OpenSettings -> DocumentFormat.OpenXml.Packaging.PresentationDocument
Public Shared Function Open (stream As Stream, isEditable As Boolean, openSettings As OpenSettings) As PresentationDocument

Parameters

stream
Stream

The IO stream on which to open the PresentationDocument.

isEditable
Boolean

In ReadWrite mode. False for Read only mode.

openSettings
OpenSettings

The advanced settings for opening a document.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "stream" is null reference.

Thrown when "stream" is not opened with Read (ReadWrite) access.

Thrown when the package is not valid Open XML PresentationDocument.

Thrown when specified to process the markup compatibility but the given target FileFormatVersion is incorrect.

Applies to

Open(String, Boolean)

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

public static DocumentFormat.OpenXml.Packaging.PresentationDocument Open (string path, bool isEditable);
static member Open : string * bool -> DocumentFormat.OpenXml.Packaging.PresentationDocument
Public Shared Function Open (path As String, isEditable As Boolean) As PresentationDocument

Parameters

path
String

The path and file name of the target PresentationDocument.

isEditable
Boolean

In ReadWrite mode. False for Read only mode.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "path" is null reference.

Thrown when the package is not valid Open XML PresentationDocument.

Applies to

Open(Package, OpenSettings)

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

public static DocumentFormat.OpenXml.Packaging.PresentationDocument Open (System.IO.Packaging.Package package, DocumentFormat.OpenXml.Packaging.OpenSettings openSettings);
static member Open : System.IO.Packaging.Package * DocumentFormat.OpenXml.Packaging.OpenSettings -> DocumentFormat.OpenXml.Packaging.PresentationDocument
Public Shared Function Open (package As Package, openSettings As OpenSettings) As PresentationDocument

Parameters

package
Package

The specified OpenXml package.

openSettings
OpenSettings

The advanced settings for opening a document.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "package" is not opened with Read (ReadWrite) access.

Thrown when package is a null reference.

Thrown when the package is not a valid Open XML document.

Thrown when specified to process the markup compatibility but the given target FileFormatVersion is incorrect.

Applies to

Open(Package)

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

public static DocumentFormat.OpenXml.Packaging.PresentationDocument Open (System.IO.Packaging.Package package);
static member Open : System.IO.Packaging.Package -> DocumentFormat.OpenXml.Packaging.PresentationDocument
Public Shared Function Open (package As Package) As PresentationDocument

Parameters

package
Package

The specified OpenXml package.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "package" is null reference.

Thrown when "package" is not opened with Read (ReadWrite) access.

Thrown when the package is not valid Open XML PresentationDocument.

Applies to

Open(Stream, Boolean)

Creates a new instance of the PresentationDocument class from the IO stream.

public static DocumentFormat.OpenXml.Packaging.PresentationDocument Open (System.IO.Stream stream, bool isEditable);
static member Open : System.IO.Stream * bool -> DocumentFormat.OpenXml.Packaging.PresentationDocument
Public Shared Function Open (stream As Stream, isEditable As Boolean) As PresentationDocument

Parameters

stream
Stream

The IO stream on which to open the PresentationDocument.

isEditable
Boolean

In ReadWrite mode. False for Read only mode.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "stream" is null reference.

Thrown when "stream" is not opened with Read (ReadWrite) access.

Thrown when the package is not valid Open XML PresentationDocument.

Applies to