Class Series (Word VBA)

The class Series represents a series in a chart.

The main procedures of class Series are Copy, Delete, Select and SeriesCollection.Add

Set

To use a Series class variable it first needs to be instantiated, for example

Dim srs as Series
Set srs = ActiveDocument.Background.Chart.FullSeriesCollection(Index:=1)

The following procedures can be used to set variables of type Series: Chart.FullSeriesCollection, FullSeriesCollection.Item, Points, SeriesCollection.Add, SeriesCollection.Item, SeriesCollection.NewSeries, Chart.SeriesCollection and ChartGroup.SeriesCollection

For Each

Here is an example of processing the Series items in a collection.

Dim srsFullSeriesCollection As Series
For Each srsFullSeriesCollection In ActiveDocument.Background.Chart.FullSeriesCollection()
	
Next srsFullSeriesCollection

Themes

Some procedures in this class have been grouped together in themes and are described on separate theme pages

Format with its procedures Border, ClearFormats, Format, InvertColor, InvertColorIndex, MarkerBackgroundColor, MarkerBackgroundColorIndex, MarkerForegroundColor, MarkerForegroundColorIndex, MarkerStyle and PlotColorIndex
Formula with its procedures Formula, FormulaLocal, FormulaR1C1 and FormulaR1C1Local
Value with its procedures Values and XValues

Methods

These are the main methods of the Series class

Copy - If the series has a picture fill, copies the picture to the Clipboard.

ActiveDocument.Background.Chart.FullSeriesCollection(1).Copy

Delete - Deletes the object.

ActiveDocument.Background.Chart.FullSeriesCollection(1).Delete

Select - Selects the object.

ActiveDocument.Background.Chart.FullSeriesCollection(1).Select

SeriesCollection.Add - Adds one or more new series to the collection.

Dim srs As Series
Set srs = ActiveDocument.Background.Chart.SeriesCollection.Add(Source:=)

Other Methods

ApplyDataLabels - Applies data labels to a series.

ActiveDocument.Background.Chart.FullSeriesCollection(1).ApplyDataLabels

ErrorBar - Applies error bars to the series.

ActiveDocument.Background.Chart.FullSeriesCollection(1).ErrorBar Direction:=xlChartX, Include:=xlErrorBarIncludeBoth, Type:=xlErrorBarTypeCustom

SeriesCollection.Extend - Adds new data points to an existing series collection.

ActiveDocument.Background.Chart.SeriesCollection.Extend Source:=

Properties

FullSeriesCollection.Count returns a Long that represents the number of full series in the collection.

Dim lngCount As Long
lngCount = ActiveDocument.Background.Chart.FullSeriesCollection.Count

FullSeriesCollection.Parent returns an object that represents the parent object of the specified FullSeriesCollection object.

Dim objParent As Object
Set objParent = ActiveDocument.Background.Chart.FullSeriesCollection.Parent

ApplyPictToEnd true if a picture is applied to the end of the point or all points in the series.

ActiveDocument.Background.Chart.FullSeriesCollection(1).ApplyPictToEnd = True

ApplyPictToFront true if a picture is applied to the front of the point or all points in the series.

ActiveDocument.Background.Chart.FullSeriesCollection(1).ApplyPictToFront = True

ApplyPictToSides true if a picture is applied to the sides of the point or all points in the series.

ActiveDocument.Background.Chart.FullSeriesCollection(1).ApplyPictToSides = True

AxisGroup returns the type of axis group.

ActiveDocument.Background.Chart.FullSeriesCollection(1).AxisGroup = xlPrimary

BarShape returns or sets the shape used for a single series in a 3D bar or column chart.

ActiveDocument.Background.Chart.FullSeriesCollection(1).BarShape = xlBox

BubbleSizes returns or sets a string that refers to the worksheet cells that contain the x-value, y-value, and size data for the bubble chart.

ActiveDocument.Background.Chart.FullSeriesCollection(1).BubbleSizes =

ChartType returns or sets the chart type.

ActiveDocument.Background.Chart.FullSeriesCollection(1).ChartType =

ErrorBars returns the error bars for the series.

Dim ebsErrorBars As ErrorBars
Set ebsErrorBars = ActiveDocument.Background.Chart.FullSeriesCollection(1).ErrorBars

Explosion returns or sets the explosion value for a pie-chart or doughnut-chart slice.

ActiveDocument.Background.Chart.FullSeriesCollection(1).Explosion =

GeoMappingLevel

ActiveDocument.Background.Chart.FullSeriesCollection(1).GeoMappingLevel = xlGeoMappingLevelAutomatic

GeoProjectionType

ActiveDocument.Background.Chart.FullSeriesCollection(1).GeoProjectionType = xlGeoProjectionTypeAlbers

Has3DEffect true if the series has a three-dimensional appearance.

ActiveDocument.Background.Chart.FullSeriesCollection(1).Has3DEffect = True

HasDataLabels true if the series has data labels.

ActiveDocument.Background.Chart.FullSeriesCollection(1).HasDataLabels = True

HasErrorBars true if the series has error bars.

ActiveDocument.Background.Chart.FullSeriesCollection(1).HasErrorBars = True

HasLeaderLines true if the series has leader lines.

ActiveDocument.Background.Chart.FullSeriesCollection(1).HasLeaderLines = True

InvertIfNegative true if Microsoft Word inverts the pattern in the object when it corresponds to a negative number.

ActiveDocument.Background.Chart.FullSeriesCollection(1).InvertIfNegative = True

IsFiltered returns or sets a Boolean that determines whether the specified chart series is filtered out from the chart.

ActiveDocument.Background.Chart.FullSeriesCollection(1).IsFiltered = True

LeaderLines returns the leader lines for the series.

Dim llsLeaderLines As LeaderLines
Set llsLeaderLines = ActiveDocument.Background.Chart.FullSeriesCollection(1).LeaderLines

MarkerSize returns or sets the data-marker size, in points.

ActiveDocument.Background.Chart.FullSeriesCollection(1).MarkerSize =

Name returns or sets the name of the object.

ActiveDocument.Background.Chart.FullSeriesCollection(1).Name =

Parent returns the parent for the specified object. Read-only object.

Dim objParent As Object
Set objParent = ActiveDocument.Background.Chart.FullSeriesCollection(1).Parent

ParentDataLabelOption specifies the parent data label option (banner, overlapping, or none) for the specified series within the chart group.

ActiveDocument.Background.Chart.FullSeriesCollection(1).ParentDataLabelOption = xlParentDataLabelOptionsBanner

PictureType returns or sets a value that specifies how pictures are displayed on a column or bar picture chart.

ActiveDocument.Background.Chart.FullSeriesCollection(1).PictureType = xlStack

PictureUnit2 returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale; otherwise, this property is ignored.

ActiveDocument.Background.Chart.FullSeriesCollection(1).PictureUnit2 =

PlotOrder returns or sets the plot order for the selected series within the chart group.

ActiveDocument.Background.Chart.FullSeriesCollection(1).PlotOrder =

QuartileCalculationInclusiveMedian true if the series uses an inclusive median quartile calculation method.

ActiveDocument.Background.Chart.FullSeriesCollection(1).QuartileCalculationInclusiveMedian = True

RegionLabelOption

ActiveDocument.Background.Chart.FullSeriesCollection(1).RegionLabelOption = xlRegionLabelOptionsBestFitOnly

SeriesColorGradientStyle

ActiveDocument.Background.Chart.FullSeriesCollection(1).SeriesColorGradientStyle = xlSeriesColorGradientStyleDiverging

Shadow returns or sets a value that indicates whether the object has a shadow.

ActiveDocument.Background.Chart.FullSeriesCollection(1).Shadow = True

Smooth true if curve smoothing is enabled for the line chart or scatter chart.

ActiveDocument.Background.Chart.FullSeriesCollection(1).Smooth = True

Type returns or sets the series type.

ActiveDocument.Background.Chart.FullSeriesCollection(1).Type =

ValueSortOrder

ActiveDocument.Background.Chart.FullSeriesCollection(1).ValueSortOrder = xlValueAscending

SeriesCollection.Count returns the number of objects in the collection.

Dim lngCount As Long
lngCount = ActiveDocument.Background.Chart.SeriesCollection.Count

SeriesCollection.Parent returns the parent for the specified object. Read-only object.

Dim objParent As Object
Set objParent = ActiveDocument.Background.Chart.SeriesCollection.Parent