Partager via


ChartBorder.LineStyle Property (PowerPoint)

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

Version Information

Version Added: PowerPoint 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

Note

Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

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