HasTextFrame Property
This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.
Returns an MsoTriState constant if the specified shape has a TextFrame object associated with it. Read-only.
expression.HasTextFrame
expression Required. An expression that returns one of the objects in the Applies To list.
Remarks
If the HasTextFrame property is true, clients must check the value of the HasText property of the TextFrame object to determine if there is any text on the shape.
Example
This example tests all the shapes in the selection and if none have text frames associated with them, they are left aligned.
Sub MoveLeft()
Dim shpAll As ShapeRange
Set shpAll = Application.ActiveDocument.Selection.ShapeRange
If shpAll.HasTextFrame = msoFalse Then
shpAll.Align msoAlignLefts, msoTrue
End If
End Sub