ColorSchemes.Add Method
Adds a color scheme to the collection of available schemes. Returns a ColorSchemes object that represents the added color scheme.
Namespace: Microsoft.Office.Interop.PowerPoint
Assembly: Microsoft.Office.Interop.PowerPoint (in Microsoft.Office.Interop.PowerPoint.dll)
Syntax
'Declaration
Function Add ( _
Scheme As ColorScheme _
) As ColorScheme
'Usage
Dim instance As ColorSchemes
Dim Scheme As ColorScheme
Dim returnValue As ColorScheme
returnValue = instance.Add(Scheme)
ColorScheme Add(
ColorScheme Scheme
)
Parameters
- Scheme
Type: Microsoft.Office.Interop.PowerPoint.ColorScheme
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 you omit this parameter, the first ColorScheme object (the first standard color scheme) in the specified presentation's ColorSchemes collection is used.
Return Value
Type: Microsoft.Office.Interop.PowerPoint.ColorScheme
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 Microsoft PowerPoint automatically checks whether a color scheme is a duplicate when a user attempts to add it by using the user interface, PowerPoint doesn't check when you attempt to add a color scheme programmatically. Your procedure must do its own checking to avoid adding redundant color schemes.