Borders.OutsideLineWidth 属性 (Word)Borders.OutsideLineWidth property (Word)

返回或设置对象外部边框的线条宽度。Returns or sets the line width of the outside border of an object. 可读写。Read/write.

语法Syntax

expressionexpression. OutsideLineWidth

expression:必需。expression Required. 代表边框集合的变量。A variable that represents a 'Borders' collection.

备注Remarks

此属性返回wdUndefined对象是否带有外部边框使用多个线宽;否则,返回False写。This property returns wdUndefined if the object has outside borders with more than one line width; otherwise, returns False or a WdLineWidth constant. 可以设置为TrueFalse写。Can be set to True , False , or a WdLineWidth constant.

示例Example

本示例为活动文档的第一个表格添加波浪形边框。This example adds a wavy border around the first table in the active document.

If ActiveDocument.Tables.Count >= 1 Then 
 With ActiveDocument.Tables(1).Borders 
 .OutsideLineStyle = wdLineStyleSingleWavy 
 .OutsideLineWidth = wdLineWidth075pt 
 End With 
End If

本示例在活动文档的前 4 段四周添加点线型边框。This example adds dotted borders around the first four paragraphs in the active document.

Set myDoc = ActiveDocument 
Set myRange = myDoc.Range(Start:=myDoc.Paragraphs(1).Range.Start, _ 
 End:=myDoc.Paragraphs(4).Range.End) 
myRange.Borders.OutsideLineStyle = wdLineStyleDot 
myRange.Borders.OutsideLineWidth = wdLineWidth075pt

另请参阅See also

边框集合对象Borders Collection Object