Placeholders 属性

       

返回一个 Placeholders 集合,该集合代表幻灯片中所有的占位符集合。集合中的每个占位符可包含文本、图表、表格、组织结构图或其他对象。只读。

示例

本示例在当前演示文稿中添加一张幻灯片,然后为该幻灯片标题(幻灯片的第一个占位符)和副标题添加文本。

Set myDocument = ActivePresentation.Slides(1)
With ActivePresentation.Slides _
        .Add(1, ppLayoutTitle).Shapes.Placeholders
    .Item(1).TextFrame.TextRange.Text = "This is the title text"
    .Item(2).TextFrame.TextRange.Text = "This is subtitle text"
End With