返回或设置内部边框的颜色。WdColorIndex,可读写。
WdColorIndex 可以是下列 WdColorIndex 常量之一: |
wdAuto |
wdBlack |
wdBlue |
wdBrightGreen |
wdByAuthor |
wdDarkBlue |
wdDarkRed |
wdDarkYellow |
wdGray25 |
wdGray50 |
wdGreen |
wdNoHighlight |
wdPink |
wdRed |
wdTeal |
wdTurquoise |
wdViolet |
wdWhite |
wdYellow |
expression.InsideColorIndex
expression 必需。该表达式返回一个 Border 对象。
如果将 InsideLineStyle 属性设置为 wdLineStyleNone 或 False,则本属性的设置不产生任何效果。
本示例在活动文档第一个表格的行列之间添加边框,然后设置内部和外部边框的颜色。
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
本示例在活动文档前四段之间添加红色边框。
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