Class LegendKey (Word VBA)

The class LegendKey represents a legend key in a chart legend.

Class LegendEntry gives access to class LegendKey.


Dim lky as LegendKey
Set lky = ActiveDocument.Background.Chart.Legend.LegendEntries(1).LegendKey

Methods

ClearFormats - Clears the formatting of the object.

Delete - Deletes the object.

Properties

Format returns the line, fill, and effect formatting for the object.

Height returns the height, in points, of the object.

InvertIfNegative true if Microsoft Word inverts the pattern in the object when it corresponds to a negative number.

Left returns the distance, in points, from the left edge of the object to the left edge of the chart area.

MarkerBackgroundColor sets the marker background color as an RGB value or returns the corresponding color index value.

MarkerBackgroundColorIndex returns or sets the marker background color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone.

MarkerForegroundColor sets the marker foreground color as an RGB value or returns the corresponding color index value.

MarkerForegroundColorIndex returns or sets the marker foreground color as an index into the current color palette, or as one of the following XlColorIndex constants: xlColorIndexAutomatic or xlColorIndexNone.

MarkerSize returns or sets the data-marker size, in points.

MarkerStyle returns or sets the marker style for a point or series in a line chart, scatter chart, or radar chart.

PictureType returns or sets the way pictures are displayed on a legend key.

PictureUnit2 returns or sets the unit for each picture on the chart if the PictureType property is set to xlStackScale; otherwise, this property is ignored.

Shadow returns or sets a value that indicates whether the object has a shadow.

Smooth true if curve smoothing is turned on for the legend key.

Top returns the distance, in points, from the top edge of the object to the top of the first row (on a worksheet) or the top of the chart area (on a chart).

Width returns the width, in points, of the object.

ChartFormat - Provides access to the OfficeArt formatting for chart elements.