ChartGroups object (Word)

Represents one or more series plotted in a chart with the same format.

Remarks

A ChartGroups collection is a collection of all the ChartGroup objects in the specified chart. A chart contains one or more chart groups, each chart group contains one or more series, and each series contains one or more points. For example, a single chart might contain both a line chart group, containing all the series plotted with the line chart format, and a bar chart group, containing all the series plotted with the bar chart format.

The following example displays the number of chart groups on the first chart of the active document. Use the ChartGroups property to return the ChartGroups collection.

MsgBox ActiveDocument.InlineShapes(1).Chart._ 
 ChartGroups.Count

The following example adds drop lines to chart group 1 on chart sheet 1. Use ChartGroups (index), where index is the chart group index number, to return a single ChartGroup object.

ActiveDocument.InlineShapes(1).Chart._ 
 ChartGroups(1).HasDropLines = True

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.