Previous Document Next Document

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


ShapeRange.Add

Sub Add(Shape As Shape)

Description

Member of ShapeRange

The Add method adds a specified shape to a shape range.

Parameter
Description
Shape
Specifies the shape to add

VBA example

The following VBA example creates a registration mark consisting of a circle and two lines, groups the objects, and then moves them to the center of the page.

Sub Test()
 Dim sGroup As Shape
 Dim sr As New ShapeRange
 sr.Add ActiveLayer.CreateEllipse2(0, 0, 0.25)
 sr.Add ActiveLayer.CreateLineSegment(-0.5, 0, 0.5, 0)
 sr.Add ActiveLayer.CreateLineSegment(0, -0.5, 0, 0.5)
 sr.SetOutlineProperties 0.03
 Set sGroup = sr.Group
 sGroup.Move ActivePage.SizeWidth / 2, ActivePage.SizeHeight / 2
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.