

The recorder always uses the ShapeRange property when recording shapes.Ī ShapeRange object doesn't include InlineShape objects.

The GroupItems property for a Shape object returns the GroupShapes object, which represents all the shapes that were grouped to form one shape. Use the Group, Regroup, or UnGroup method to create and work with a single shape formed from a shape range. Use the Align, Distribute, or ZOrder method to position a set of shapes relative to each other or relative to the document. Set myRange = ActiveDocument.Sections(1).Range This example selects all the shapes in the first section of the active document. The following example sets the fill for the first shape in the selection, assuming that the selection contains at least one shape. Use ShapeRange ( index), where index is the name or the index number, to return a Shape object that represents a shape within a selection. For example, Shapes(1) is simpler than Shapes.Range(1). (Array("Oval 4", "Rectangle 5")).SelectĪlthough you can use the Range method to return any number of shapes, it is simpler to use the Item method if you want to return only a single member of the collection. (This tab is visible only when the text box is selected.) Click the Edit Shape tool, in the Insert Shapes group. The following example selects the shapes named Oval 4 and Rectangle 5 on the active document. The following example sets the fill pattern for shapes one and three on the active document. Use Visual Basic's Array function to construct an array of names or index numbers. Use Range ( index), where index is the name or index number of the shape or an array that contains either names or index numbers of shapes, to return a ShapeRange collection that represents a set of shapes on a document. Some operations, when performed on a ShapeRange object that contains more than one shape, will cause an error.
How to align word document into box shape full#
Stock Images lets you choose stock images, icons, cutout people, stickers, and illustrations.The full stock image library is only available to users signed into Word for Microsoft 365. Most operations that you can do with a Shape object, you can also do with a ShapeRange object that contains only one shape. Select the location of the image from the Insert Picture From menu: This Device lets you choose an image stored on your computer or network server. For example, you could construct a ShapeRange collection that contains the first three shapes in a document, all the selected shapes in a document, or all the freeform shapes in a document. You can include whichever shapes you want-chosen from among all the shapes in the document or all the shapes in the selection-to construct a shape range. A shape range can contain as few as one shape or as many as all the shapes in the document. Represents a shape range, which is a set of shapes on a document.
