ChartBorder Object
Collapse the table of content
Expand the table of content

ChartBorder Object (Word)

Office 2013 and later

Contribute to this content

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

Represents the border of an object.

Most bordered objects have a border that is treated as a single entity, regardless of how many sides it has. The entire border must be returned as a unit. To return a Border object, use the Border property for the particular bordered object (for example, the Border property of a TrendLine object).

The following example changes the type and line style of a trendline on the active chart.

With ActiveDocument.InlineShapes(1).Chart.SeriesCollection(1).Trendlines(1) 
 .Type = xlLinear 
 .Border.LineStyle = xlDash 
End With
© 2016 Microsoft