ColorSchemes Interface
A collection of all the ColorScheme objects in the specified presentation. Each ColorScheme object represents a color scheme, which is a set of colors that are used together on a slide.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
<GuidAttribute("9149346E-5A91-11CF-8700-00AA0060263B")> _
Public Interface ColorSchemes _
Inherits Collection
'Usage
Dim instance As ColorSchemes
[GuidAttribute("9149346E-5A91-11CF-8700-00AA0060263B")]
public interface ColorSchemes : Collection
Examples
Use the ColorSchemes property to return the ColorSchemes collection. Use ColorSchemes(index), where index is the color scheme index number, to return a single ColorScheme object. The following example deletes color scheme two from the active presentation.
ActivePresentation.ColorSchemes(2).Delete
Use the Add(ColorScheme) method to create a new color scheme and add it to the ColorSchemes collection. The following example adds a color scheme to the active presentation and sets the title color and background color for the color scheme (because no argument was used with the Add method, the added color scheme is initially identical to the first standard color scheme in the presentation).
With ActivePresentation.ColorSchemes.Add
.Colors(ppTitle).RGB = RGB(255, 0, 0)
.Colors(ppBackground).RGB = RGB(128, 128, 0)
End With
Set the ColorScheme property of a Slide, SlideRange, or Master object to return the color scheme for one slide, a set of slides, or a master, respectively. The following example sets the color scheme for all the slides in the active presentation to the third color scheme in the presentation.
With ActivePresentation
.Slides.Range.ColorScheme = .ColorSchemes(3)
End With