Add a Title and Picture
slide to a presentation and then replace the title and picture placeholders with your own title and picture.
Import the PPT package so that you do not have to use long, fully qualified names for the PPT API classes.
Create a presentation.
Add a slide that has a Title and Picture
layout.
Use the find
method of the slide object to find the placeholder object that has the name Title
.
titlePlaceholderObj =
TextBoxPlaceholder with properties:
Bold: []
Font: []
ComplexScriptFont: []
FontColor: []
FontSize: []
Italic: []
Strike: []
Subscript: []
Superscript: []
Underline: []
BackgroundColor: []
VAlign: []
Name: 'Title'
X: []
Y: []
Width: []
Height: []
Style: []
Children: []
Parent: [1×1 mlreportgen.ppt.Slide]
Tag: 'ppt.TextBoxPlaceholder:6:9'
Id: '6:9'
The find
method returns an mlreportgen.ppt.TextBoxPlaceholder
object.
Replace the placeholder content with the title text.
Use the find
method of the slide object to find the placeholder object that has the name Picture
.
picturePlaceholderObj =
PicturePlaceholder with properties:
Bold: []
Font: []
ComplexScriptFont: []
FontColor: []
FontSize: []
Italic: []
Strike: []
Subscript: []
Superscript: []
Underline: []
BackgroundColor: []
VAlign: []
Name: 'Picture'
X: []
Y: []
Width: []
Height: []
Style: []
Children: []
Parent: [1×1 mlreportgen.ppt.Slide]
Tag: 'ppt.PicturePlaceholder:7:10'
Id: '7:10'
The find
method returns an mlreportgen.ppt.PicturePlaceholder
object.
Replace the picture placeholder with a picture.
Close and view the presentation