Table of contents
TOC
Collapse the table of content
Expand the table of content

Legend Object (PowerPoint)

office 365 dev account|Last Updated: 6/12/2017
|
1 Contributor

Represents the legend in a chart. Each chart can have only one legend.

Remarks

The Legend object contains one or more LegendEntry objects; each LegendEntry object contains a LegendKey object.

The chart legend is not visible unless the HasLegend property is True. If this property is False, properties and methods of the Legend object will fail.

Example

Note Although the following code applies to Microsoft Word, you can readily modify it to apply to PowerPoint.

Use the Legend property to return the Legend object. The following example sets the font style for the legend of the first chart in the active document to bold.

With ActiveDocument.InlineShapes(1)

    If .HasChart Then

        .Chart.Legend.Font.Bold = True

    End If

End With

See also

Concepts

PowerPoint Object Model Reference

© 2017 Microsoft