TextFrame2.DeleteText Method
Deletes the text from a text frame and all the associated properties of the text, including font attributes.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Sub DeleteText
'Usage
Dim instance As TextFrame2
instance.DeleteText()
void DeleteText()
Examples
This example shows how to delete the text from shape one on slide one of the active presentation, if that shape contains text.
Public Sub DeleteText_Example()
Dim pptSlide As Slide
Set pptSlide = ActivePresentation.Slides(1)
pptSlide.Shapes(1).TextFrame2.DeleteText
End Sub