TextFrame.HasText property (Publisher)

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.

With ActiveDocument.Pages(1).Shapes(2).TextFrame 
 If .HasText Then .AutoFitText = pbTextAutoFitBestFit 
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.