Previous Document Next Document

Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.SetPosition


ShapeRange.SetPosition

Sub SetPosition(PositionX As Double, PositionY As Double)

Description

Member of ShapeRange

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

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

Parameter
Description
PositionX
Specifies, in document units, the horizontal position of the range
PositionY
Specifies, in document units, the vertical position of the range

VBA example

The following VBA 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 2013 Corel Corporation. All rights reserved.