PlaceholderFormat 对象 (PowerPoint)
包含专门应用于占位符的属性,例如占位符类型。
使用PlaceholderFormat属性返回一个 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
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。