Previous Document Next Document

Object Model Reference : Classes : A : ArrowHead : Properties : ArrowHead.Index


ArrowHead.Index

Property Index As Long

Description

Member of ArrowHead

The Index property returns the index number associated with an arrowhead type. For example, ArrowHeads(5) refers to the fifth arrowhead in the collection.

The Index property returns a read-only value.

VBA example

The following VBA example takes all of the shapes in the current selection, and determines which shapes have outlines. If the shape has an outline, an arrowhead with an index of five replaces all of the arrowheads that have an index of 1. This is done for both the start arrows and end arrows of the shape objects.

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

Previous Document Next Document Back to Top

Copyright 2013 Corel Corporation. All rights reserved.