TextFrame.HasText property (Word)
True if the specified shape has text associated with it. Read-only Boolean.
expression A variable that represents a 'TextFrame' object.
If the second shape on the active document contains text, this example displays a message if the text overflows its frame.
Dim docActive As Document Set docActive = ActiveDocument With docActive.Shapes(2).TextFrame If .HasText = True Then If .Overflowing = True Then Msgbox "Text overflows the frame." End If End If End With
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.