This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English version of the page.

Note: This page has been translated by MathWorks. Click here to see
To view all translated materials including this page, select Country from the country navigator on the bottom of this page.


Package: mlreportgen.ppt

Add text box, table, or picture to slide


slideObj = add(slide,object)



slideObj = add(slide,object) adds a text box, table, or picture to a slide.


collapse all

Create a presentation.

import mlreportgen.ppt.*

slidesFile = 'mySlideAddPresentation.pptx';
slides = Presentation(slidesFile);
slide1 = add(slides,'Blank');

Create an mlreportgen.ppt.Picture object.

plane = Picture(which('b747.jpg'));
plane.X = '4in';
plane.Y = '4in';
plane.Width = '5in';
plane.Height = '2in';

Add the plane picture to slide1.


Generate the presentation. Open mySlideAddPresentation.pptx.


Open the presentation mySlideAdd.pptx file. On a Windows® platform, you can open the presentation in MATLAB®:

if ispc

Input Arguments

collapse all

Slide to add content to, specified as an mlreportgen.ppt.Slide object.

Object to add to a slide, specified as one of these PPT objects:

  • mlreportgen.ppt.TextBox

  • mlreportgen.ppt.Table

  • mlreportgen.ppt.Picture

Output Arguments

collapse all

Slide, returned as an mlreportgen.ppt.Slide object.

Introduced in R2015b