| 
       | 
        
       | Object Model Reference : Classes : S : ShapeRange : Methods : ShapeRange.Add  | 
      
Sub Add(Shape As Shape)
Member of ShapeRange
The Add method adds a specified shape to a shape range.
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  | 
| 
       | 
        
       | 
		      
		          
		             | 
      
Copyright 2013 Corel Corporation. All rights reserved.