Share via


IsInline Property [Publisher 2003 VBA Language Reference]

Returns an MsoTriState constant that specifies whether a shape is inline. Read-only.

MsoTriState can be one of these MsoTriState constants.
msoCTrue
msoFalse if a shape is not contained in a text run.
msoTriStateMixed
msoTriStateToggle
msoTrue if a shape is contained in a text run.

expression.IsInline

expression Required. An expression that returns one of the objects in the Applies To list.

Example

This example tests the first shape (a text frame) on the first page of the publication to see if it is inline. If it is not, a search is done within that shape to find any inline shapes within the text frame. Any inline shapes that are found have the ForeColor property set to red.

Dim theShape As Shape
Dim i As Integer

Set theShape = ActiveDocument.Pages(1).Shapes(1)

If Not theShape.IsInline = True Then
    With theShape.TextFrame.Story.TextRange
        If .InlineShapes.Count > 0 Then
            For i = 1 To .InlineShapes.Count
                .InlineShapes(i).Select
                .InlineShapes(i).Fill.ForeColor.RGB = vbRed
            Next
        End If
    End With
End If

Applies to | Shape Object | ShapeRange Collection