InlineShapes.AddChart2(Int32, XlChartType, Object, Object) 方法

定义

向文档添加图表。 返回一个 InlineShape 对象,该对象代表图表并将其添加到指定的集合。

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

参数

Style
Int32

图表样式。

Type
XlChartType

图表类型。

Range
Object

图表将在文本中放置的区域。 除非该区域处于折叠状态,否则图表将替换该区域。 如果省略此参数,则会自动放置图表。

NewLayout
Object

如果 NewLayout 为 true,则使用新的动态格式设置规则插入图表, (标题处于打开状态,并且仅当有多个系列) 时,图例才处于打开状态。

返回

适用于