Border.Color property (Word)

Returns or sets the 24-bit color for the specified Border object.



expression Required. A variable that represents a 'Border' object.


This property can be any valid WdColor constant or a value returned by Visual Basic's RGB function.


This example adds a dotted indigo border around each cell in the first table.

If ActiveDocument.Tables.Count >= 1 Then 
 For Each aBorder In ActiveDocument.Tables(1).Borders 
 aBorder.Color = wdColorIndigo 
 aBorder.LineStyle = wdLineStyleDashDot 
 aBorder.LineWidth = wdLineWidth075pt 
 Next aBorder 
End If

See also

Border Object

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.