Previous Document Next Document
ShapeRange.SetPosition

Sub SetPosition(PositionX As Double, PositionY As Double)

Member of ShapeRange

The SetPosition method sets both the horizontal and vertical positions of all of the shapes in the range, treating the group of shapes as a single object.

The position of the range is set relative to a reference point specified by the Document.ReferencePoint property.

Parameters
Description
PositionX
Sets the horizontal position of the range, in document units
PositionY
Sets the vertical position of the range, in document units

The following code example aligns the selected shapes to the upper-right corner of the page:

Sub Test() 
 ActiveDocument.ReferencePoint = cdrTopRight 
 ActiveSelectionRange.SetPosition ActivePage.SizeWidth, 
ActivePage.SizeHeight 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.