Partager via


Trendline.Type Property (PowerPoint)

Returns or sets the trendline type. Read/write XlTrendlineType.

Version Information

Version Added: PowerPoint 2007

Syntax

expression .Type

expression A variable that represents a Trendline object.

Example

Note

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

The following example changes the trendline type for the first series of the first chart in the active document. If the series has no trendline, this example fails.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Trendlines(1).Type = xlMovingAvg

    End If

End With

See Also

Concepts

Trendline Object Members

Trendline Object