Skip to content

Latest commit

 

History

History
53 lines (33 loc) · 1.1 KB

Word.FillFormat.ForeColor.md

File metadata and controls

53 lines (33 loc) · 1.1 KB
title keywords f1_keywords api_name ms.assetid ms.date ms.localizationpriority
FillFormat.ForeColor property (Word)
vbawd10.chm164102245
vbawd10.chm164102245
Word.FillFormat.ForeColor
23ee2f7e-12f4-fba4-8b8c-9d6d4debe526
06/08/2017
medium

FillFormat.ForeColor property (Word)

Returns or sets a ColorFormat object that represents the foreground color for the fill. Read/write.

Syntax

expression.ForeColor

expression A variable that represents a FillFormat object.

Example

This example adds a rectangle to the active document and then sets the foreground color, background color, and gradient for the rectangle's fill.

Dim docActive As Document 
 
Set docActive = ActiveDocument
With docActive.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

See also

FillFormat Object

[!includeSupport and feedback]