Show AllShow All

InsideColorIndex Property

Returns or sets the color of the inside borders. Read/write WdColorIndex.

expression.InsideColorIndex

expression    Required. An expression that returns a Border object.

Remarks

If the InsideLineStyle property is set to either wdLineStyleNone or False, setting this property has no effect.

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.

Dim tableTemp As Table

If ActiveDocument.Tables.Count >= 1 Then
    Set tableTemp = ActiveDocument.Tables(1)
    With tableTemp.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.

Dim docActive As Document
Dim rngTemp As Range

Set docActive = ActiveDocument
Set rngTemp = docActive.Range( _
    Start:=docActive.Paragraphs(1).Range.Start, _
    End:=docActive.Paragraphs(4).Range.End)

With rngTemp.Borders
    .InsideLineStyle = wdLineStyleSingle
    .InsideLineWidth = wdLineWidth150pt
    .InsideColorIndex = wdRed
End With