LeaderLines Object
TOC
Collapse the table of content
Expand the table of content

LeaderLines Object (Word)

Office 2013 and later
GitHub-Mark-64px

Contribute to this content

Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation.

Represents leader lines on a chart. Leader lines connect data labels to data points.

This object is not a collection; there is no object that represents a single leader line.

This object applies only to pie charts.

Use the LeaderLines property to return the LeaderLines object. The following example adds data labels and blue leader lines to series one on the first chart in the active document. If no leader lines are visible, this example code will fail. In this situation, you can manually drag one of the data labels away from the pie chart to make a leader line show up.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart.SeriesCollection(1) 
 .HasDataLabels = True 
 .DataLabels.Position = xlLabelPositionBestFit 
 .HasLeaderLines = True 
 .LeaderLines.Border.ColorIndex = 5 
 End With 
 End If 
End With
Show:
© 2016 Microsoft