getMasterNames
Class: mlreportgen.ppt.Presentation
Package: mlreportgen.ppt
Get names of slide masters for presentation
Description
returns the names of slide masters for a presentation.mNames
= getMasterNames(presentation
)
Examples
Get Slide Master Names in the Default Template
Get the slide master names so that you can find the layout names to use when you add slides to a presentation.
Import the PPT package 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("myPresentation");
open(ppt);
Get the names of the master slides in the presentation. The default PPT API template has only one slide master.
mNames = getMasterNames(ppt); mNames{1}
ans = 'Office Theme'
Get the names of the layouts in the slide master.
layouts = getLayoutNames(ppt,mNames{1})
layouts = 1×13 cell
{'Title Slide'} {'Title and Vertical Text'} {'Vertical Title and Text'} {'Title and Table'} {'Title and Picture'} {'Title and Content'} {'Section Header'} {'Two Content'} {'Comparison'} {'Title Only'} {'Blank'} {'Content with Caption'} {'Picture with Caption'}
Add a title slide to the presentation, using the Title Slide
layout, and replace the title in the slide.
slide = add(ppt,"Title Slide"); replace(slide, "Title","My Title");
Close and view the presentation.
close(ppt); rptview(ppt);
Input Arguments
presentation
— Presentation to get slide master names for
mlreportgen.ppt.Presentation
object
Presentation to get slide master names for, specified as an mlreportgen.ppt.Presentation
object.
Output Arguments
mNames
— Slide masters in presentation
cell array of character vectors
Slide masters in the presentation, returned as a cell array of character vectors.
Version History
Introduced in R2015b
Open Example
You have a modified version of this example. Do you want to open this example with your edits?
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.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list:
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- 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)