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

ExtraColors Object (PowerPoint)

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

Represents the extra colors in a presentation. The object can contain up to eight colors, each of which is represented by an red-green-blue (RGB) value.


Use the ExtraColorsproperty to return the ExtraColors object. Use ExtraColors (index), where index is the extra color index number, to return the red-green-blue (RGB) value for a single extra color. The following example adds a rectangle to slide one in the active presentation and sets its fill foreground color to the first extra color. If there hasn't been at least one extra color defined for the presentation, this example will fail.

With ActivePresentation
    Set rect = .Slides(1).Shapes _
        .AddShape(msoShapeRectangle, 50, 50, 100, 200)
    rect.Fill.ForeColor.RGB = .ExtraColors(1)
End With

Use the Addmethod to add an extra color. The following example adds an extra color to the active presentation (if the color hasn't already been added).

ActivePresentation.ExtraColors.Add RGB(69, 32, 155)

See also


PowerPoint Object Model Reference

© 2017 Microsoft