ChartBorder.LineStyle Property (Word)

Returns or sets the line style for the border. Read/write XlLineStyle, xlGray25, xlGray50, xlGray75, or xlAutomatic.

Version Information

Version Added: Word 2007

Syntax

expression .LineStyle

expression A variable that represents a ChartBorder object.

Remarks

The xlDouble and xlSlantDashDot constants of the XlLineStyle enumeration do not apply to charts.

Example

The following example puts a border around the chart area and the plot area of the first chart in the active document.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 With .Chart 
 .ChartArea.Border.LineStyle = xlDashDot 
 With .PlotArea.Border 
 .LineStyle = xlDashDotDot 
 .Weight = xlThick 
 End With 
 End With 
 End If 
End With 

See Also

Concepts

ChartBorder Object Members

ChartBorder Object