Add Method (ColorSchemes Collection Object)

See Also         Example         Applies To

Adds a color scheme to the collection of available schemes. Returns a ColorScheme object that represents the added color scheme.

Syntax

expression.Add(ColorScheme)

expression   Required. An expression that returns a ColorSchemes object.

ColorScheme   Optional ColorScheme object. The color scheme to add. Can be a ColorScheme object from any slide or master, or an item in the ColorSchemes collection from any open presentation. If this argument is omitted, the first ColorScheme object (the first standard color scheme) in the specified presentation's ColorSchemes collection is used.

Remarks

The new color scheme is based on the colors used on the specified slide or master or on the colors in the specified color scheme from an open presentation.

The ColorSchemes collection can contain up to 16 color schemes. If you need to add another color scheme and the ColorSchemes collection is already full, use the Delete method to remove an existing color scheme.

Note that although PowerPoint automatically checks whether a color scheme is a duplicate before adding it through the user interface, it doesn't check before adding a color scheme through a Visual Basic procedure. Your procedure must do its own checking to avoid adding redundant color schemes.