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. Please click here
To view all translated materials including this page, select Japan from the country navigator on the bottom of this page.


Package: mlreportgen.ppt

Search in slide


searchResults = find(slide,objectName)



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


collapse 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

collapse 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

collapse 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

Was this topic helpful?