CellBorder.Color property (Publisher)
Returns a ColorFormat object representing the color information for the specified object.
Syntax
expression.Color
expression A variable that represents a CellBorder object.
Example
This example tests the font color of the first story in the active document and tells the user whether the font color is black.
Sub FontColor()
If Application.ActiveDocument.Stories(1) _
.TextRange.Font.Color.RGB = RGB(Red:=0, Green:=0, Blue:=0) Then
MsgBox "Your font color is black"
Else
MsgBox "Your font color is not black"
End If
End Sub
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.