WPS 基础接口 > 演示 API 参考 > Shape > 属性 > Shape.PlaceholderFormat 属性
返回一个 PlaceholderFormat 对象,该对象包含占位符特有的属性。只读。

语法

表达式.PlaceholderFormat

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

返回值
PlaceholderFormat

示例

以下示例在当前演示文稿内第一张幻灯片的第一个占位符中添加文本(如果该占位符是水平标题占位符)。

示例代码
let actpders = ActivePresentation.Slides.Item(1).Shapes.Placeholders
if(actpders.Count > 0){
    switch (actpders.Item(1).PlaceholderFormat.Type){
        case ppPlaceholderTitle:
            actpders.Item(1).TextFrame.TextRange = "Title Text"
            break
        case ppPlaceholderCenterTitle:
            actpders.Item(1).TextFrame.TextRange = "Centered Title Text"
            break
        default:
            MsgBox ("There's no horizontal" + "title on this slide")
    }
}


请参阅