Shapes.AddChart2 Method (Word)

Office 2013

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

Version Added: Word 2013

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

expression A variable that represents a Shapes object.

Parameters

Name

Required/Optional

Data type

Description

Style

Optional

INT32

The chart style.

Type

Optional

XLCHARTTYPE

The type of chart.

Left

Optional

VARIANT

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

Top

Optional

VARIANT

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

Width

Optional

VARIANT

The width, in points, of the chart.

Height

Optional

VARIANT

The height, in points, of the chart.

Anchor

Optional

VARIANT

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

Type

Optional

XLCHARTTYPE

Top

Optional

VARIANT

Width

Optional

VARIANT

Height

Optional

VARIANT

Anchor

Optional

VARIANT

NewLayout

Optional

VARIANT

Return value

SHAPE

Concepts

Other resources

Show:
© 2014 Microsoft