InlineShapes.AddChart2(Int32, XlChartType, Object, Object) Method

Definition

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

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

Parameters

Style
Int32

The chart style.

Type
XlChartType

The type of chart.

Range
Object

The range where the chart will be placed in the text. The chart replaces the range, unless the range is collapsed. If this argument is omitted, the chart is placed automatically.

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