Documentation

This is machine translation

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

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

mlreportgen.ppt.Slide.find

Package: mlreportgen.ppt

Search in slide

Syntax

searchResults = find(slide,objectName)

Description

example

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

Examples

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®:

close(slides);

if ispc
    winopen(slidesFile);
end

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?