ColorFormat.SchemeColor property (PowerPoint)

Returns or sets the color in the applied legacy color scheme that's associated with the specified object. Provided for backwards compatibility. Use the [ObjectThemeColor] instead for Office 2007 and later. Read/write.

Syntax

expression. SchemeColor

expression A variable that represents a ColorFormat object.

Return value

PpColorSchemeIndex

Remarks

The value of the SchemeColor property can be one of these PpColorSchemeIndex constants.

ppAccent1
ppAccent2
ppAccent3
ppBackground
ppFill
ppForeground
ppNotSchemeColor
ppSchemeColorMixed
ppShadow
ppTitle

Example

This example switches the background color on slide one in the active presentation between an explicit red-green-blue value and the color-scheme background color.

With ActivePresentation.Slides(1)

    .FollowMasterBackground = False

    With .Background.Fill.ForeColor

        If .Type = msoColorTypeScheme Then

            .RGB = RGB(0, 128, 128)

        Else

            .SchemeColor = ppBackground

        End If

    End With

End With

See also

ColorFormat Object

Support and feedback

Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.