find
Class: mlreportgen.ppt.Slide
Namespace: mlreportgen.ppt
Search slide for content
Description
searches a slide for a slide content object whose 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.
Website auswählen
Wählen Sie eine Website aus, um übersetzte Inhalte (sofern verfügbar) sowie lokale Veranstaltungen und Angebote anzuzeigen. Auf der Grundlage Ihres Standorts empfehlen wir Ihnen die folgende Auswahl: .
Sie können auch eine Website aus der folgenden Liste auswählen:
So erhalten Sie die bestmögliche Leistung auf der Website
Wählen Sie für die bestmögliche Website-Leistung die Website für China (auf Chinesisch oder Englisch). Andere landesspezifische Websites von MathWorks sind für Besuche von Ihrem Standort aus nicht optimiert.
Amerika
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- 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)