Upravit

Sdílet prostřednictvím


Shape.Duplicate method (Word)

Creates a duplicate of the specified Shape object, adds the new shape to the Shapes collection at a standard offset from the original shapes, and then returns the new Shape object.

Syntax

expression.Duplicate

expression Required. A variable that represents a Shape object.

Example

This example creates a duplicate of shape one on the active document and then changes the fill for the new shape.

Set newShape = ActiveDocument.Shapes(1).Duplicate 
With newShape 
 .Fill.PresetGradient msoGradientVertical, 1, msoGradientGold 
End With

See also

Shape Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.