Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

ColorFormat Object

Office 2007
Represents the color of a one-color object, the foreground or background color of an object with a gradient or patterned fill, or the pointer color. You can set colors to an explicit red-green-blue value (by using the RGB property) or to a color in the color scheme (by using the SchemeColor property).

Remarks

Use one of the properties listed in the following table to return a ColorFormat object.

Use this property With this objectTo return a ColorFormat object that represents this
DimColorAnimationSettingsColor used for dimmed objects
BackColorFillFormatBackground fill color (used in a shaded or patterned fill)
ForeColorFillFormatForeground fill color (the fill color for a solid fill)
ColorFontBullet or character color
BackColorLineFormatBackground line color (used in a patterned line)
ForeColorLineFormatForeground line color (or just the line color for a solid line)
ForeColorShadowFormatShadow color
PointerColorSlideShowSettingsDefault pointer color for a presentation
PointerColorSlideShowViewTemporary pointer color for a view of a slide show
ExtrusionColorThreeDFormatColor of the sides of an extruded object

Example

Use the SchemeColor property to set the color of a slide element to one of the colors in the standard color scheme. The following example sets the text color for shape one on slide two in the active presentation to the standard color-scheme title color.

Visual Basic for Applications
ActivePresentation.Slides(2).Shapes(1).TextFrame.TextRange.Font.Color.SchemeColor = ppTitle

Use the RGB property to set a color to an explicit red-green-blue value. The following example adds a rectangle to myDocument and then sets the foreground color, background color, and gradient for the rectangle's fill.

Visual Basic for Applications
Set myDocument = ActivePresentation.Slides(1)
With myDocument.Shapes.AddShape(msoShapeRectangle, 90, 90, 90, 50).Fill
    .ForeColor.RGB = RGB(128, 0, 0)
    .BackColor.RGB = RGB(170, 170, 170)
    .TwoColorGradient msoGradientHorizontal, 1
End With



Community Additions

Show:
© 2015 Microsoft