Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.SetSizeEx |
Sub SetSizeEx(CenterX As Double, CenterY As Double, [Width As Double], [Height As Double])
Member of ShapeRange
The SetSizeEx method sets the size of the shapes in a shape range, treating the range as a single object. You can specify the reference point around which the range is stretched.
• |
See also the ShapeRange.SizeWidth and ShapeRange.SizeHeight properties, as
well as the ShapeRange.GetBoundingBox and ShapeRange.SetBoundingBox
methods.
|
The following VBA example stretches the shape range on the active layer proportionally, so that its width is 2".
Sub Test() |
Dim x As Double, y As Double |
Dim sr As ShapeRange |
Set sr = ActiveLayer.Shapes.All |
If sr.Count > 0 Then |
ActiveDocument.ReferencePoint = cdrCenter |
sr.GetPosition x, y |
sr.SetSizeEx x, y, 2 |
End If |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.