全部显示

InsideColor 属性

       

返回或设置内部边框的 24 位颜色。可取任何有效的 WdColor 常量或 Visual Basic 的 RGB 函数的返回值。可读写。

expression.InsideColor

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

说明

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

示例

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

If ActiveDocument.Tables.Count >= 1 Then
    Set myTable = ActiveDocument.Tables(1)
    With myTable.Borders
        .InsideLineStyle = True
        .InsideColor = wdColorBlueGray
        .OutsideColor = wdColorPink
    End With
End If

本示例在活动文档的前四个段落之间添加深红色边框。

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
    .InsideColor = wdDarkRed
End With