Object Model Reference : Classes : S : Shape : Methods : Shape.GetSize |
Sub GetSize(Width As Double, Height As Double)
Member of Shape
The GetSize method returns the horizontal and vertical size of a shape.
• |
See also the Shape.SizeWidth and Shape.SizeHeight properties.
|
Parameter
|
Description
|
Width
|
Specifies the width of the shape object, in document units
|
Height
|
Specifies the height of the shape object, in document units
|
The following VBA example returns the width and height of each shape on the active page, and it creates a rectangle with the same dimensions.
Sub Test() |
Dim s As Shape |
Dim x As Double, y As Double |
ActiveDocument.ReferencePoint = cdrBottomLeft |
For Each s In ActivePage.Shapes |
s.GetSize x, y |
ActiveLayer.CreateRectangle2 0, 0, x, y |
Next s |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.