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

Search in slide



searchResults = find(slide,objectName) searches for a slide content object whose Name property has the value that you specify using objectName.


expand all

Create a presentation.

import mlreportgen.ppt.*

slidesFile = 'mySlideFindPresentation.pptx';
slides = Presentation(slidesFile);
slide1 = add(slides,'Title and Content');

Search in slide1 for content object whose Name property is Content.

contents = find(slide1,'Content');

Make the content in the Content object in slide1 bold.

contents(1).Bold = true;
add(contents(1),'This is in bold');

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


if ispc

Input Arguments

expand all

Slide to search, specified as an mlreportgen.ppt.Slide object or as a character vector that contains the name of a slide in the presentation.

Object Name property to search for, specified as a character vector. The search looks for content objects in the specified slide that have a Name property that matches the search string. The search looks in the specified slide. Search strings are case sensitive and match the full string.

Output Arguments

expand all

Search results, represented by an array of PPT placeholder objects. The array can contain these placeholder objects:

  • mlreportgen.ppt.ContentPlaceholder

  • mlreportgen.ppt.TextBoxPlaceholder

  • mlreportgen.ppt.TablePlaceholder

  • mlreportgen.ppt.PicturePlaceholder

Introduced in R2015b