Export (0) Print
Expand All

InlineShapes.AddChart Method

Office 2007
Inserts a chart, of the specified type, as an inline shape into the active document, and opens Microsoft Office Excel with a sheet that contains the default data that Microsoft Office Word uses to create the chart.

Syntax

expression.AddChart(Type, Range)

expression   An expression that returns an InlineShapes object.

Parameters

NameRequired/OptionalData TypeDescription
TypeOptionalXlChartTypeSpecifies the type of chart to create.
RangeOptionalVariantSpecifies the text to which the chart is bound. If Range is specified, the chart is positioned at the beginning of the first paragraph in the range. If this argument is omitted, the range is selected automatically, and the chart is positioned relative to the top and left edges of the page.

Return Value
InlineShape

Example

Creates a new 3-D column chart and adds it to the active document.

Visual Basic for Applications
ActiveDocument.InlineShapes.AddChart Type:=xl3DColumn



Community Additions

ADD
Show:
© 2015 Microsoft