全部显示

InsideColorIndex 属性

       

返回或设置内部边框的颜色。WdColorIndex,可读写。

expression.InsideColorIndex

expression   必需。该表达式返回一个 Border 对象。

说明

如果将 InsideLineStyle 属性设置为 wdLineStyleNoneFalse,则本属性的设置不产生任何效果。

示例

本示例在活动文档第一个表格的行列之间添加边框,然后设置内部和外部边框的颜色。

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