Open Method

Microsoft PowerPoint Visual Basic

Show All

Open Method

       

Opens the specified presentation. Returns a Presentation object that represents the opened presentation.

expression.Open(FileName, ReadOnly, Untitled, WithWindow, OpenConflictDocument)

expression   Required. An expression that returns a Presentations collection.

FileName   Required String. The name of the file to open.

ReadOnly  Optional MsoTriState. Specifies whether the file is opened with read/write or read-only status.

MsoTriState can be one of these MsoTriState constants.
msoCTrue
msoFalse Default. Opens the file with read/write status.
msoTriStateMixed
msoTriStateToggle
msoTrue Opens the file with read-only status.

Untitled  Optional MsoTriState. Specifies whether the file has a title.

MsoTriState can be one of these MsoTriState constants.
msoCTrue
msoFalse Default. The file name automatically becomes the title of the opened presentation.
msoTriStateMixed
msoTriStateToggle
msoTrue Opens the file without a title. This is equivalent to creating a copy of the file.

WithWindow  Optional MsoTriState. Specifies whether the file is visible.

MsoTriState can be one of these MsoTriState constants.
msoCTrue
msoFalse Hides the opened presentation. 
msoTriStateMixed
msoTriStateToggle
msoTrue Default. Opens the file in a visible window.

OpenConflictDocument  Optional MsoTriState. Specifies whether to open the conflict file for a presentation with an offline conflict.

MsoTriState can be one of these MsoTriState constants.
msoCTrue
msoFalse Default. Opens the server file and ignores the conflict document.
msoTriStateMixed
msoTriStateToggle
msoTrue Opens the conflict file and overwrites the server file.

Remarks

With the proper file converters installed, Microsoft PowerPoint opens files with the following MS-DOS file extensions: .ch3, .cht, .doc, .htm, .html, .mcw, .pot, .ppa, .pps, .ppt, .pre, .rtf, .sh3, .shw, .txt, .wk1, .wk3, .wk4, .wpd, .wpf, .wps, and .xls.

Example

This example opens a presentation with read-only status.

Presentations.Open FileName:="c:\My Documents\pres1.ppt", _
    ReadOnly:=msoTrue