Word) (Border.Color 属性

返回或设置指定 Border 对象的 24 位颜色。

语法

表达式颜色

expression 是必需的。 表示“Border”对象的变量。

备注

此属性可以是任何有效的 WdColor 常量或 Visual Basic RGB 函数所返回的值。

示例

本示例在第一个表格中每个单元格周围添加靛蓝色的点划线边框。

If ActiveDocument.Tables.Count >= 1 Then 
 For Each aBorder In ActiveDocument.Tables(1).Borders 
 aBorder.Color = wdColorIndigo 
 aBorder.LineStyle = wdLineStyleDashDot 
 aBorder.LineWidth = wdLineWidth075pt 
 Next aBorder 
End If

另请参阅

Border 对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。