InsideColorIndex Property
Applies To
Borders collection object.
Description
Returns or sets the color of the inside borders. Can be any of the following WdColorIndex constants: wdAuto, wdBlack, wdBlue, wdBrightGreen, wdDarkBlue, wdDarkRed, wdDarkYellow, wdGray25, wdGray50, wdGreen, wdPink, wdRed, wdTeal, wdTurquoise, wdViolet, wdWhite, or wdYellow. Read/write Long.
Remarks
If the InsideLineStyle property is set to either wdLineStyleNone or False, setting this property has no effect.
See Also
InsideLineStyle property, InsideLineWidth property, OutsideColorIndex property, OutsideLineStyle property.
Example
This example adds borders between rows and between columns in the first table in the active document, and then it sets the colors for both the inside and outside borders.
If ActiveDocument.Tables.Count >= 1 Then
Set myTable = ActiveDocument.Tables(1)
With myTable.Borders
.InsideLineStyle = True
.InsideColorIndex = wdBrightGreen
.OutsideColorIndex = wdPink
End With
End If
This example adds red borders between the first four paragraphs in the active document.
Set myDoc = ActiveDocument
Set myRange = myDoc.Range(Start:=myDoc.Paragraphs(1).Range.Start, _
End:=myDoc.Paragraphs(4).Range.End)
With myRange.Borders
.InsideLineStyle = wdLineStyleSingle
.InsideLineWidth = wdLineWidth150pt
.InsideColorIndex = wdRed
End With