ExtraColors Interface

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.

Namespace:  Microsoft.Office.Interop.PowerPoint
Assembly:  Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)

Syntax

'Declaration
<GuidAttribute("91493468-5A91-11CF-8700-00AA0060263B")> _
Public Interface ExtraColors _
    Inherits Collection
'Usage
Dim instance As ExtraColors
[GuidAttribute("91493468-5A91-11CF-8700-00AA0060263B")]
public interface ExtraColors : Collection

Examples

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(Int32) 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)

See Also

Reference

ExtraColors Members

Microsoft.Office.Interop.PowerPoint Namespace