Previous Document Next Document

Object Model Reference : Classes : A : ArrowHeads : Properties : ArrowHeads.Count


ArrowHeads.Count

Property Count As Long

Description

Member of ArrowHeads

The Count property returns the number of arrowheads in an ArrowHeads collection.

The Count property returns a read-only value.

VBA example

The following VBA example identifies all arrowheads of selected objects that have an index of one and replaces them with arrowheads that have an index equal to the total number of arrowhead objects. This replaces the selected arrowheads with the last arrowhead in the ArrowHeads collection.

Sub Count()
 Dim s As Shape
 Dim Arrow As ArrowHead
 Set Arrow = ArrowHeads(ArrowHeads.Count)
 For Each s In ActiveDocument.Selection.Shapes
  If s.Outline.Type = cdrOutline Then
   With s.Outline
    If .StartArrow.Index = 1 Then
     .StartArrow = Arrow
    End If
    If .EndArrow.Index = 1 Then
     .StartArrow = Arrow
    End If
   End With
  End If
 Next s
End Sub

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.