Borders.InsideColorIndex property (Word)
Returns or sets the color of the inside borders. Read/write WdColorIndex.
Syntax
expression. InsideColorIndex
expression Required. A variable that represents a 'Borders' collection.
Remarks
If the InsideLineStyle property is set to either wdLineStyleNone or False, setting this property has no effect.
Example
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
See also
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.