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

ColorSchemes Object (PowerPoint)

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

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.

Example

Use the ColorSchemesproperty 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 Addmethod 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 ColorSchemeproperty 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

See also

Concepts

PowerPoint Object Model Reference

© 2017 Microsoft