全部显示

OutsideLineStyle 属性

       

返回或设置指定对象的外部边框。如果指定对象使用了一种以上的边框类型,则返回 wdUndefined;否则返回 FalseWdLineStyle 常量。可将其设置为 TrueFalse WdLineStyle 常量。

expression.OutsideLineStyle

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

说明

如果为 True,则将线型设置为默认线型,线宽设置为默认线宽。可用 DefaultBorderLineWidthDefaultBorderLineStyle 属性来设置默认线型和线宽。

使用下列两条指令中的任何一条,都可删除活动文档中第一个表格的外部边框。

ActiveDocument.Tables(1).Borders.OutsideLineStyle = wdLineStyleNone
ActiveDocument.Tables(1).Borders.OutsideLineStyle = False

示例

本示例为活动文档的第一段的周围添加 0.75 磅宽的双边框。

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

本示例在活动文档的第一个表格周围添加边框。

If ActiveDocument.Tables.Count >= 1 Then
    Set myTable = ActiveDocument.Tables(1)
    myTable.Borders.OutsideLineStyle = wdLineStyleSingle
End If