pptview

Open Microsoft PowerPoint presentation or convert it to PDF

Syntax

[Status,Message] = pptview(filename)
[Status,Message] = pptview(filename,conversionMode)
[Status,Message] = pptview(filename,'closeapp','closedoc')
[Status,Message] = pptview(filename,'closedoc')

Description

example

[Status,Message] = pptview(filename) opens the specified PPT file in PowerPoint® on Windows® or Apache OpenOffice™ on Linux®.

[Status,Message] = pptview(filename,conversionMode) converts the specified PowerPoint file to PDF on PCs with Microsoft® Office installed.

[Status,Message] = pptview(filename,'closeapp','closedoc') closes the PPT application and presentation file.

[Status,Message] = pptview(filename,'closedoc') closes the presentation file.

Examples

collapse all

Open a PPT file. The file opens in PowerPoint on Windows or Apache OpenOffice on Linux.

pptview('myppt');

Convert a PPT file to PDF format and close the PPT file. Run this command only on PCs with Microsoft Office installed.

pptview('myppt','converttopdf');

Input Arguments

collapse all

PPT file to open or convert, specified as a character vector of a file name on the MATLAB® path or the full path name. You do not need to include the file extension.

Example: 'myppt', 'MyPresentations/myppt'

Method of converting the PPT file to PDF, specified as one of these values:

  • 'converttopdf'— Convert to PDF without displaying the results.

  • 'showaspdf'—Convert to PDF and display the results in the PDF Viewer.

Output Arguments

collapse all

Success indicator for opening or converting the PPT file, returned as 1 for success and 0 for failure.

Error or warning information about opening or converting the file, returned as a character vector.

Introduced in R2016a