返回一个 PlaceholderFormat 对象,该对象包含占位符的独有属性。只读。
如果当前演示文稿第一张幻灯片的第一个占位符是水平标题占位符,本示例在其中添加文本。
With ActivePresentation.Slides(1).Shapes.Placeholders
If .Count > 0 Then
With .Item(1)
Select Case .PlaceholderFormat.Type
Case ppPlaceholderTitle
.TextFrame.TextRange = "Title Text"
Case ppPlaceholderCenterTitle
.TextFrame.TextRange = "Centered Title Text"
Case Else
MsgBox "There's no horizontal" & _
"title on this slide"
End Select
End With
End If
End With