包含专门应用于占位符的属性,例如占位符类型。
示例
使用 PlaceholderFormat 属性返回
PlaceholderFormat 对象。如果活动演示文稿第一张幻灯片的第一个占位符存在并且是水平标题占位符,以下示例将在该占位符中添加文本。
示例代码 |
let PFormat = ActivePresentation.Slides.Item(1).Shapes.Placeholders
if(PFormat.Count > 0){
let PFormat1 = PFormat.Item(1)
switch(PFormat1.PlaceholderFormat.Type){
case ppPlaceholderTitle:
PFormat1.TextFrame.TextRange = "Title Text"
break
case ppPlaceholderCenterTitle:
PFormat1.TextFrame.TextRange = "Centered Title Text"
break
default:
MsgBox("There's no horizontal "+"title on this slide")
}
}
|
Placeholder Format 对象