AddTitle Method
Applies To
Shapes collection object.
Description
Restores a previously deleted title placeholder to a slide. Returns a Shape object that represents the restored title.
Note This method will cause an error if you haven't previously deleted the title placeholder from the specified slide. Use the HasTitle property to determine whether the title placeholder has been deleted.
Syntax
expression.AddTitle
expression Required. An expression that returns a Shapes object.
See Also
AddPlaceholder method.
Example
This example restores the title placeholder to slide one in the active presentation if this placeholder has been deleted. The text of the restored title is "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