Previous Document Next Document

Object Model Reference : Classes : S : Shape : Properties : Shape.Next


Shape.Next

Property Next([Level As cdrShapeLevel = cdrLevelPage], [EnterGroups As Boolean = False], [Loop As Boolean = True]) As Shape

Description

Member of Shape

The Next property returns the next shape in a document.

The Next property returns a read-only value.

Parameter
Description
Level
Specifies whether to limit the scope to the current group, layer, page, or document. This parameter is optional, and its default value is cdrLevelPage (3).
EnterGroups
Specifies how to handle grouped shapes. If this value is set to False, groups are treated as separate shapes, ignoring any shapes within the group. If it is set to True, group shapes are still returned. This parameter is optional, and its default value is False.
Loop
Specifies how to loop during the search. If this value is set to True and the last shape in the scope is reached, the first shape of the group, layer, or document is returned. Otherwise, Nothing is returned. This parameter is optional, and its default value is True.

VBA example

The following VBA example selects the next shape on a current layer, entering groups as necessary.

Sub Test()
 Dim s As Shape
 Set s = ActiveShape
 If s Is Nothing Then
  MsgBox "Nothing is selected."
 Else
  s.Next(cdrLevelLayer, True, True).CreateSelection
 End If
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.