add

Class: mlreportgen.ppt.Slide
Package: mlreportgen.ppt

Add text box, table, or picture to slide

Description

example

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

Examples

expand 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.

add(slide1,plane);

Generate the presentation. Open mySlideAddPresentation.pptx.

close(slides);

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

if ispc
    winopen(slidesFile);
end

Input Arguments

expand 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

expand all

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

Introduced in R2015b