Presentations.Open2007 Method
Opens the specified presentation and provides the option to repair the presentation file. Returns a Presentation object that represents the opened presentation.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Function Open2007 ( _
FileName As String, _
ReadOnly As MsoTriState, _
Untitled As MsoTriState, _
WithWindow As MsoTriState, _
OpenAndRepair As MsoTriState _
) As Presentation
'Usage
Dim instance As Presentations
Dim FileName As String
Dim ReadOnly As MsoTriState
Dim Untitled As MsoTriState
Dim WithWindow As MsoTriState
Dim OpenAndRepair As MsoTriState
Dim returnValue As Presentation
returnValue = instance.Open2007(FileName, _
ReadOnly, Untitled, WithWindow, OpenAndRepair)
Presentation Open2007(
string FileName,
MsoTriState ReadOnly,
MsoTriState Untitled,
MsoTriState WithWindow,
MsoTriState OpenAndRepair
)
Parameters
- FileName
Type: System.String
The name of the file to open.
- ReadOnly
Type: Microsoft.Office.Core.MsoTriState
Specifies whether the file is opened with read/write or read-only status.
- Untitled
Type: Microsoft.Office.Core.MsoTriState
Specifies whether the file has a title.
- WithWindow
Type: Microsoft.Office.Core.MsoTriState
Specifies whether the file is visible.
- OpenAndRepair
Type: Microsoft.Office.Core.MsoTriState
Specifies whether to repair the file before it is opened to prevent corruption.
Return Value
Type: Microsoft.Office.Interop.PowerPoint.Presentation
Remarks
With the proper file converters installed, Microsoft Office PowerPoint 2003 and earlier versions open files with the following MS-DOS filename extensions: .ch3, .cht, .doc, .htm, .html, .mcw, .pot, .ppa, .pps, .ppt, .pre, .rtf, .sh3, .shw, .txt, .wk1, .wk3, .wk4, .wpd, .wpf, .wps, and .xls. Microsoft PowerPoint 2010 also opens files with the following filename extensions: .docm, .docx, .mhtml, .potm, .potx, .ppam, .pptm, .pptx, .ppsm, .ppsx, .thmx, .xlsm, and .xlsx.
The ReadOnly parameter value can be one of these MsoTriState constants.
Constant |
Description |
---|---|
The default. Opens the file with read/write status. |
|
Opens the file with read-only status. |
The Untitled parameter value can be one of these MsoTriState constants.
Constant |
Description |
---|---|
The default. The file name automatically becomes the title of the opened presentation. |
|
Opens the file without a title. This is equivalent to creating a copy of the file. |
The WithWindow parameter value can be one of these MsoTriState constants.
Constant |
Description |
---|---|
Hides the opened presentation. |
|
The default. Opens the file in a visible window. |
The OpenAndRepair parameter value can be one of these MsoTriState constants.
Constant |
Description |
---|---|
Opens the specified presentation without repair.. |
|
The default. Opens the specified file and repairs it. |