Shapes.AddChart2 (PowerPoint)

Adds a chart to the document. Returns a Shape object that represents a chart and adds it to the specified collection.

Syntax : expression.AddChart2 (Style, Type, Left, Top, Width, Height, NewLayout)

Dim shpAddChart2 As Shape
Set shpAddChart2 = ActivePresentation.SlideMaster.Shapes.AddChart2()

Arguments

The following arguments are optional

Style (Long) - The chart style. Use "-1" to get the default style for the chart type specified in Type.

Type (Office.XlChartType) - The type of chart.

Left (Single) - The position, in points, of the left edge of the chart, relative to the anchor.

Top (Single) - The position, in points, of the top edge of the chart, relative to the anchor.

Width (Single) - The width, in points, of the chart.

Height (Single) - The height, in points, of the chart.

NewLayout (Boolean) - If NewLayout is true, the chart is inserted by using the new dynamic formatting rules (Title is on, and Legend is on only if there are multiple series).