Share via


TextFrame.HasText Property (PowerPoint)

Returns whether the specified shape has text associated with it. Read-only.

Syntax

expression .HasText

expression A variable that represents a TextFrame object.

Return Value

MsoTriState

Remarks

The value of the HasText property can be one of these MsoTriState constants.

Constant

Description

msoFalse

The specified shape does not have text associated with it.

msoTrue

The specified shape has text associated with it.

Example

If shape two on myDocument contains text, this example resizes the shape to fit the text.

Set myDocument = ActivePresentation.Slides(1)

With myDocument.Shapes(2).TextFrame

    If .HasText Then .AutoSize = ppAutoSizeShapeToFitText

End With

See Also

Concepts

TextFrame Object Members

TextFrame Object