Table of contents
TOC
Collapse the table of content
Expand the table of content

SeriesCollection Object (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Represents a collection of all the Series objects in the specified chart or chart group.

Remarks

Use the SeriesCollection method to return the SeriesCollection collection.

Example

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

Use the Extend method to extend an existing series. The following example adds the data in cells C6:C10 in the chart's worksheet to an existing series in the series collection of the chart.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection.Extend "='Sheet1'!$C$6:$C$10"

    End If

End With

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

Use the Add method to create a new series and add it to the chart. The following example adds the data from cells D1:D5 in the chart's worksheet as a new series to the chart.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection.Add "='Sheet1'!$D$1:$D$5"

    End If

End With

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

Use SeriesCollection ( Index ), where Index is the series index number or name, to return a single Series object. The following example sets the color of the interior for the first series in embedded chart one the active document.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.SeriesCollection(1).Interior.Color = RGB(255, 0, 0)

    End If

End With

Methods

Name
Add
Extend
Item
NewSeries

Properties

Name
Application
Count
Creator
Parent

See also

Other resources

PowerPoint Object Model Reference

© 2017 Microsoft