FillFormat Object [Publisher 2003 VBA Language Reference]
Multiple objects FillFormat ColorFormat |
Represents fill formatting for a shape. A shape can have a solid, gradient, texture, pattern, picture, or semitransparent fill.
Using the FillFormat object
Use the Fill property to return a FillFormat object. The following example adds a shape to the active document and then sets the gradient and color for the shape's fill.
Sub AddShapeAndSetFill()
With ActiveDocument.Pages(1).Shapes.AddShape(Type:=msoShapeHeart, _
Left:=90, Top:=90, Width:=90, Height:=80).Fill
.ForeColor.RGB = RGB(Red:=255, Green:=0, Blue:=0)
.OneColorGradient Style:=msoGradientHorizontal, _
Variant:=1, Degree:=1
End With
End Sub
Remarks
Many of the properties of the FillFormat object are read-only. To set one of these properties, you have to apply the corresponding method.
Properties | Application Property | BackColor Property | ForeColor Property | GradientColorType Property | GradientDegree Property | GradientStyle Property | GradientVariant Property | Parent Property | Pattern Property | PresetGradientType Property | PresetTexture Property | TextureName Property | TextureType Property | Transparency Property | Type Property | Visible Property
Methods | OneColorGradient Method | Patterned Method | PresetGradient Method | PresetTextured Method | Solid Method | TwoColorGradient Method | UserPicture Method | UserTextured Method
Parent Objects | Cell Object | PageBackground Object | Shape Object | ShapeRange Collection
Child Objects | ColorFormat Object