Main Content

pptview

Open Microsoft PowerPoint presentation or convert it to PDF

Description

[Status,Message] = pptview(filename) opens the specified presentation file. The application used to open the file depends on the platform:

  • Windows®pptview opens the file in PowerPoint®.

  • Linux®pptview calls the soffice command to open the file in Apache® OpenOffice® or LibreOffice®, depending on which application is installed.

  • Macintoshpptview calls the soffice command to open the file in Apache OpenOffice, which must be installed in the /Applications folder.

example

[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 presentation.

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 or string scalar 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.

Limitations

  • pptview is not supported in MATLAB Online.

  • pptview is not supported in a MATLAB web app.

Version History

Introduced in R2016a