Shapes.AddChart2 Method

Definition

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

public Microsoft.Office.Interop.Word.Shape AddChart2 (int Style = -1, Microsoft.Office.Core.XlChartType Type = (Microsoft.Office.Core.XlChartType) -1, ref object Left, ref object Top, ref object Width, ref object Height, ref object Anchor, ref object NewLayout);
abstract member AddChart2 : int * Microsoft.Office.Core.XlChartType * obj * obj * obj * obj * obj * obj -> Microsoft.Office.Interop.Word.Shape
Public Function AddChart2 (Optional Style As Integer = -1, Optional Type As XlChartType = (Microsoft.Office.Core.XlChartType) -1, Optional ByRef Left As Object, Optional ByRef Top As Object, Optional ByRef Width As Object, Optional ByRef Height As Object, Optional ByRef Anchor As Object, Optional ByRef NewLayout As Object) As Shape

Parameters

Style
Int32

The chart style.

Type
XlChartType

The type of chart.

Left
Object

The position, in points, of the left edge of the chart, relative to the anchor.

Top
Object

The position, in points, of the top edge of the chart, relative to the anchor.

Width
Object

The width, in points, of the chart.

Height
Object

The height, in points, of the chart.

Anchor
Object

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

NewLayout
Object

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).

Returns

Applies to