SeriesCollection object (Word)

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

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

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

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 on Sheet1.

With ActiveDocument.InlineShapes(1) 
 If .HasChart Then 
 .Chart.SeriesCollection(1).Interior.Color = RGB(255, 0, 0) 
 End If 
End With

See also

Word Object Model Reference

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.