Previous Document Next Document
ShapeRange.ApplyUniformFill

Sub ApplyUniformFill(Color As Color)

Member of ShapeRange

The ApplyUniformFill method applies a uniform-fill color to all of the objects in the range.

Parameters
Description
Color
Specifies a color to be applied as a uniform color. It uses an existing color component in a palette and a CreateColor method (for example, CreateCMYKColor, CreateRGBColor, and so on) to specify a color. A color in a palette is identified by referencing the palette and the index of the color in the palette. For example, ActivePalette.Colors(50), references the 50th color in the active palette.

The following code example applies the color 50% PANTONE 875 CVU from the Metallic colors palette. The color is applied to each shape with an Overprint fill.

Sub Test() 
 Dim sr As New ShapeRange 
 Dim s As Shape 
 For Each s In ActivePage.Shapes 
  If s.OverprintFill Then sr.Add s 
 Next s 
 sr.ApplyUniformFill CreateFixedColor(cdrPANTONEMetallic, 5, 50) 
End Sub 

Previous Document Next Document Back to Top

Copyright 2007 Corel Corporation. All rights reserved.