全部显示

OutsideColorIndex 属性

       

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

expression.OutsideColorIndex

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

说明

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

示例

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

If ActiveDocument.Tables.Count >= 1 Then
    Set myTable = ActiveDocument.Tables(1)
    With myTable.Borders
        .InsideLineStyle = True
        .InsideColorIndex = wdBrightGreen
        .OutsideColorIndex = wdPink
    End With
End If

本示例为活动文档的第一段添加红色、0.75 磅的双边框。

With ActiveDocument.Paragraphs(1).Borders
    .OutsideLineStyle = wdLineStyleDouble
    .OutsideLineWidth = wdLineWidth075pt
    .OutsideColorIndex = wdRed
End With