Chart.ChartWizard (Word)
Modifies the properties of the given chart. You can use this method to quickly format a chart without setting all the individual properties. This method is noninteractive, and it changes only the specified properties.
If the Source parameter is omitted and the selection is not a chart on the active document, this method fails and an error occurs.
ChartWizard (Source, Gallery, Format, PlotBy, CategoryLabels, SeriesLabels, HasLegend, Title, CategoryTitle, ValueTitle, ExtraTitle)
With ActiveDocument.InlineShapes(1).Chart
.ChartWizard _
Gallery:=xlLine, _
HasLegend:=True, _
CategoryTitle:="Year", _
ValueTitle:="Sales"
End With
Arguments
Optional arguments
The following arguments are optional
Source (Source) - The range that contains the source data for the new chart. If this argument is omitted, Word edits the active chart sheet or the selected chart on the active worksheet.
Gallery (Office.XlChartType) - One of the XlChartType constants that specifies the chart type.
Format (Byte) - The option number for the built-in autoformats. Can be a number from 1 through 10, depending on the gallery type. If this argument is omitted, Word chooses a default value based on the gallery type and data source.
PlotBy (XlRowCol) - Specifies whether the data for each series is in rows or columns. Can be one of the following XlRowCol constants: xlRows or xlColumns.
Possible return values are xlColumns - The data series is in a row, xlRows - The data series is in a column.
CategoryLabels (Integer) - An integer that specifies the number of rows or columns within the source range that contain category labels. Allowed values are from 0 (zero) through one less than the maximum number of the corresponding categories or series.
SeriesLabels (Integer) - An integer that specifies the number of rows or columns within the source range that contain series labels. Allowed values are from 0 (zero) through one less than the maximum number of the corresponding categories or series.
HasLegend (Boolean) - True to include a legend.
Title (String) - The chart title text.
CategoryTitle (String) - The category axis title text.
ValueTitle (String) - The value axis title text.
ExtraTitle (String) - The series axis title for 3D charts or the second value axis title for 2D charts.