Borders.OutsideColorIndex 属性 (Word)
返回或设置外部边框的颜色。 读/写 WdColorIndex 。
语法
expression. OutsideColorIndex
表达式是必需的。 一个代表“Borders”集合的变量。
备注
OutsideLineStyle 属性设置为 wdLineStyleNone 或 假 ,如果将此属性设置无效。
示例
本示例在活动文档的第一个表格的行列之间添加边框,然后设置内部和外部边框的颜色。
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
另请参阅
支持和反馈
有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。