HasTitle 属性

       

返回指定幻灯片上的对象集合是否包含标题占位符。只读。MsoTriState 类型。

示例

如果当前演示文稿第一张幻灯片的标题占位符已被删除,本示例将其恢复。恢复的标题文本为“Restored title”。

With ActivePresentation.Slides(1)
    If .Layout <> ppLayoutBlank Then
        With .Shapes
            If Not .HasTitle Then
                .AddTitle.TextFrame.TextRange _
                    .Text = "Restored title"
            End If
        End With
    End If
End With