SeriesCollection.Add(Object, XlRowCol, Object, Object, Object) Method

Definition

Adds one or more new series to the collection.

public Microsoft.Office.Interop.Word.Series Add (object Source, Microsoft.Office.Interop.Word.XlRowCol Rowcol = Microsoft.Office.Interop.Word.XlRowCol.xlColumns, object SeriesLabels, object CategoryLabels, object Replace);
abstract member Add : obj * Microsoft.Office.Interop.Word.XlRowCol * obj * obj * obj -> Microsoft.Office.Interop.Word.Series
Public Function Add (Source As Object, Optional Rowcol As XlRowCol = Microsoft.Office.Interop.Word.XlRowCol.xlColumns, Optional SeriesLabels As Object, Optional CategoryLabels As Object, Optional Replace As Object) As Series

Parameters

Source
Object

The new data as a string representation of a range contained in the Workbook property of the ChartData object for the chart.

Rowcol
XlRowCol

Specifies whether the new values are in the rows or columns of the specified range.

SeriesLabels
Object

True if the first row or column contains the name of the data series. False if the first row or column contains the first data point of the series. If this argument is omitted, Microsoft Word attempts to determine the location of the series name from the contents of the first row or column.

CategoryLabels
Object

True if the first row or column contains the name of the category labels. False if the first row or column contains the first data point of the series. If this argument is omitted, Microsoft Word attempts to determine the location of the category label from the contents of the first row or column.

Replace
Object

If CategoryLabels is True and Replace is True, the specified categories replace the categories that currently exist for the series. If Replace is False, the existing categories will not be replaced. The default value is False.

Returns

A SeriesCollection object that represents the new series.

Remarks

This method does not actually return a Series object as stated in the Object Browser.

Applies to