PresentationDocument.Create Method

Definition

Overloads

Create(Package, PresentationDocumentType)

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

Create(Stream, PresentationDocumentType)

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

Create(String, PresentationDocumentType)

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

Create(Package, PresentationDocumentType, Boolean)

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

Create(Stream, PresentationDocumentType, Boolean)

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

Create(String, PresentationDocumentType, Boolean)

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

Create(Package, PresentationDocumentType)

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

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

Parameters

package
Package

The specified OpenXml package.

type
PresentationDocumentType

The type of the PresentationDocument.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "package" is null reference.

Thrown when "package" is not opened with Write access.

Applies to

Create(Stream, PresentationDocumentType)

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

public static DocumentFormat.OpenXml.Packaging.PresentationDocument Create (System.IO.Stream stream, DocumentFormat.OpenXml.PresentationDocumentType type);
static member Create : System.IO.Stream * DocumentFormat.OpenXml.PresentationDocumentType -> DocumentFormat.OpenXml.Packaging.PresentationDocument
Public Shared Function Create (stream As Stream, type As PresentationDocumentType) As PresentationDocument

Parameters

stream
Stream

The IO stream on which to create the PresentationDocument.

type
PresentationDocumentType

The type of the PresentationDocument.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "stream" is null reference.

Thrown when "stream" is not opened with Write access.

Applies to

Create(String, PresentationDocumentType)

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

public static DocumentFormat.OpenXml.Packaging.PresentationDocument Create (string path, DocumentFormat.OpenXml.PresentationDocumentType type);
static member Create : string * DocumentFormat.OpenXml.PresentationDocumentType -> DocumentFormat.OpenXml.Packaging.PresentationDocument
Public Shared Function Create (path As String, type As PresentationDocumentType) As PresentationDocument

Parameters

path
String

The path and file name of the target PresentationDocument.

type
PresentationDocumentType

The type of the PresentationDocument.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "path" is null reference.

Applies to

Create(Package, PresentationDocumentType, Boolean)

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

public static DocumentFormat.OpenXml.Packaging.PresentationDocument Create (System.IO.Packaging.Package package, DocumentFormat.OpenXml.PresentationDocumentType type, bool autoSave);
static member Create : System.IO.Packaging.Package * DocumentFormat.OpenXml.PresentationDocumentType * bool -> DocumentFormat.OpenXml.Packaging.PresentationDocument
Public Shared Function Create (package As Package, type As PresentationDocumentType, autoSave As Boolean) As PresentationDocument

Parameters

package
Package

The specified OpenXml package.

type
PresentationDocumentType

The type of the PresentationDocument.

autoSave
Boolean

Whether to auto save the created document.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "package" is null reference.

Thrown when "package" is not opened with Write access.

Applies to

Create(Stream, PresentationDocumentType, Boolean)

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

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

Parameters

stream
Stream

The IO stream on which to create the PresentationDocument.

type
PresentationDocumentType

The type of the PresentationDocument.

autoSave
Boolean

Whether to auto save the created document.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "stream" is null reference.

Thrown when "stream" is not opened with Write access.

Applies to

Create(String, PresentationDocumentType, Boolean)

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

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

Parameters

path
String

The path and file name of the target PresentationDocument.

type
PresentationDocumentType

The type of the PresentationDocument.

autoSave
Boolean

Whether to auto save the created document.

Returns

A new instance of PresentationDocument.

Exceptions

Thrown when "path" is null reference.

Applies to