ExtraColors Object (PowerPoint)

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 ExtraColors property 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 Add method 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)
Show:
© 2014 Microsoft