Share via


TextFrame.DeleteText Method (Word)

Deletes the text from a text frame and all the associated properties of the text, including font attributes.

Version Information

Version Added: Word 2010

Syntax

expression .DeleteText

expression A variable that represents a TextFrame object.

Example

The following code example deletes the text from the first shape in the active document, if that shape contains text.

Public Sub DeleteText_Example() 
 ActiveDocument.Shapes(1).TextFrame.DeleteText 
End Sub

See Also

Concepts

TextFrame Object

TextFrame Object Members