Table of contents
TOC
Collapse the table of content
Expand the table of content

Selection.ChildShapeRange Property (Publisher)

office 365 dev account|Last Updated: 8/24/2017
|
3 Contributors

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.

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.ChildShapeRange(3).AutoShapeType = msoShapeDiamond 

End Sub
© 2018 Microsoft