Skip to content

Files

Latest commit

 

History

History
47 lines (29 loc) · 1.5 KB

PowerPoint.ExtraColors.md

File metadata and controls

47 lines (29 loc) · 1.5 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
ExtraColors object (PowerPoint)
vbapp10.chm529000
vbapp10.chm529000
PowerPoint.ExtraColors
8f13d8cd-be83-21d6-ebd1-855d9289a65e
06/08/2017
medium

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.

Example

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

[!includeSupport and feedback]