Share via


Selection.ChildShapeRange Property

Publisher Developer Reference

Returns a ShapeRange object representing the child shapes of a selection.

Syntax

expression.ChildShapeRange

expression   A variable that represents a Selection object.

Return Value
ShapeRange

Example

This example creates a new page in the active publication, populates the page with shapes, and selects and groups the shapes. Then, after canceling the selection of two of the group shapes, it changes the AutoShape type for one of the shapes.

Visual Basic for Applications
  Sub ChangeFillToChildShape()
With ThisDocument.Pages(1)
    With .Shapes
        .AddShape msoShape4pointStar, 10, 10, 175, 175
        .AddShape msoShapeOval, 100, 100, 175, 75
        .AddShape msoShapeOval, 150, 150, 175, 75
        .Range.Group
        .SelectAll
    End With
    .Shapes(1).GroupItems(1).Select msoFalse
    .Shapes(1).GroupItems(2).Select msoFalse
End With

Selection.<strong>ChildShapeRange</strong>(3).AutoShapeType = msoShapeDiamond

End Sub

See Also