find
Class: mlreportgen.ppt.Slide
Namespace: mlreportgen.ppt
Search slide for content
Description
searchResults = find(slide,objectName)Name property
                value matches objectName.
Examples
Find a content object in an mlreportgen.ppt.Slide object by using the find method.
Import the PPT namespace so that you do not have to use long, fully qualified names for the PPT API classes.
import mlreportgen.ppt.*Create a presentation.
ppt = Presentation('mySlideFindPresentation.pptx');
open(ppt);Add a slide with a Title and Content layout.
slide = add(ppt,'Title and Content');Search the slide for a content object that has the Name property value 'Content'.
contents = find(slide,'Content')contents = 
  ContentPlaceholder with properties:
                 Bold: []
                 Font: []
    ComplexScriptFont: []
            FontColor: []
             FontSize: []
               Italic: []
               Strike: []
            Subscript: []
          Superscript: []
            Underline: []
      BackgroundColor: []
               VAlign: []
                 Name: 'Content'
                    X: []
                    Y: []
                Width: []
               Height: []
                Style: []
             Children: []
               Parent: [1×1 mlreportgen.ppt.Slide]
                  Tag: 'ppt.ContentPlaceholder:198:244'
                   Id: '198:244'
find returns a 1-by-1 array that contains an mlreportgen.ppt.ContentPlaceholder object. Specify that the text in the placeholder object is bold and add text to the object.
contents(1).Bold = true;
add(contents(1),'This is bold text');Close and view the presentation.
close(ppt); rptview(ppt);
Here is the generated presentation:

Input Arguments
Slide to search, specified as an mlreportgen.ppt.Slide object.
Name property value to search for, specified as a
                        character vector or string scalar.
When you add a slide to a presentation, the add method
                        sets the Name property of the content objects in the
                        slide based on the slide layout. See getLayoutNames. The
                            Name property values include:
- "Title"
- "Content"
- "Table"
- "Picture"
- "Text"
- "Vertical Text"
The Name property can also be set to a custom
                        value.
Output Arguments
Search results, returned as an array of content objects such as:
Version History
Introduced in R2015b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)