The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

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)

public static PresentationDocument Open(
	string path,
	bool readWriteMode


Type: System.String
Specifies the path and file name of the target Package for the OpenXmlPackage.
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.


Throws an exception when path is null reference.


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