Share via


TextFrame.HasText Property

Publisher Developer Reference

Returns an MsoTriState constant indicating whether the specified shape has text associated with it. Read-only.

Syntax

expression.HasText

expression   A variable that represents a TextFrame object.

Example

If shape two on the first page of the active publication contains text, this example resizes the shape to fit the text.

Visual Basic for Applications
  With ActiveDocument.Pages(1).Shapes(2).TextFrame
    If .HasText Then .AutoFitText = pbTextAutoFitBestFit
End With

See Also