TextFrame.DeleteText Method (Word)

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

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

TextFrame Object