Object Model Reference : Classes : S : ShapeRange : Properties : ShapeRange.PositionX |
Property PositionX As Double
Member of ShapeRange
The PositionX property returns or specifies the x-coordinate of the position of a shape range, treating the range as a single object. This coordinate is relative to the anchor point specified by the Document.ReferencePoint property.
• |
See also the ShapeRange.GetPosition, ShapeRange.SetPosition,
ShapeRange.Move, ShapeRange.GetBoundingBox, and
ShapeRange.SetBoundingBox methods.
|
The following VBA example creates a shape range containing all the ellipses on the page and it then duplicates the range. The duplicated shapes are placed in the lower-left corner of the page, treating the shape range as a group.
Sub Test() |
Dim sr1 As ShapeRange, sr2 As ShapeRange |
Set sr1 = ActivePage.FindShapes(Type:=cdrEllipseShape) |
Set sr2 = sr1.Duplicate |
ActiveDocument.ReferencePoint = cdrBottomLeft |
sr2.PositionX = 0 |
sr2.PositionY = 0 |
End Sub |
Copyright 2013 Corel Corporation. All rights reserved.