TextFrame2.DeleteText method (PowerPoint)
Deletes the text from a text frame and all the associated properties of the text, including font attributes.
Syntax
expression.DeleteText
expression An expression that returns a TextFrame2 object.
Return value
Nothing
Example
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
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for