Shape.PlaceholderFormat 属性 (PowerPoint)

返回一个 PlaceholderFormat 对象,该对象包含占位符所特有的属性。 此为只读属性。

语法

expressionPlaceholderFormat

表达 一个代表 Shape 对象的变量。

返回值

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 支持和反馈,获取有关如何接收支持和提供反馈的指南。