FillFormat object (Publisher)
Represents fill formatting for a shape. A shape can have a solid, gradient, texture, pattern, picture, or semitransparent fill.
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.
Use the Shape.Fill property to return a FillFormat object.
Example
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
Methods
- OneColorGradient
- Patterned
- PresetGradient
- PresetTextured
- Solid
- TwoColorGradient
- UserPicture
- UserTextured
Properties
- Application
- BackColor
- ForeColor
- GradientAngle
- GradientColorType
- GradientDegree
- GradientStyle
- GradientVariant
- Parent
- Pattern
- PresetGradientType
- PresetTexture
- RotateWithObject
- TextureAlignment
- TextureHorizontalScale
- TextureName
- TextureOffsetX
- TextureOffsetY
- TextureType
- TextureVerticalScale
- Transparency
- Type
- Visible
See also
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.
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for