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.Presentation.find

Package: mlreportgen.ppt

Search in presentation

Syntax

searchResults = find(presentation,objectName)

Description

example

searchResults = find(presentation,objectName) searches in the presentation for the content objects whose Name property value matches the value you specify using objectName.

Examples

collapse all

Create a presentation.

import mlreportgen.ppt.*

slidesFile = 'myPresFindPresentation.pptx';
slides = Presentation(slidesFile);
add(slides,'Title Slide');
add(slides,'Title and Content');

Use the Presentation.find method to find presentation objects whose Name property is Title.

contents = find(slides,'Title')
contents = 

  1x2 TextBoxPlaceholder array with properties:

    Bold
    FontColor
    Italic
    Strike
    Subscript
    Superscript
    Underline
    Name
    X
    Y
    Width
    Height
    Style
    Children
    Parent
    Tag
    Id

Create a paragraph.

p = Paragraph('My Presentation Title');

Replace the content in slide 1 with Paragraph object p.

replace(contents(1),p);

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

close(slides);

if ispc
    winopen(slidesFile);
end

Input Arguments

collapse all

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

Name property value to search for, specified as a character vector. The search looks in the whole presentation, searching for objects with the specified Name property value. Searches are case sensitive and match the full search character vector.

Output Arguments

collapse all

Search results, returned as an object array.

Introduced in R2015b

Was this topic helpful?