返回或设置文本的右边与右边框的距离(以磅为单位)。Long 类型,可读写。
注意 对页面边框使用本属性时,既可设置文本与右边框的距离,也可以设置页面右边缘与右边框的距离。根据何种参照设置该距离,取决于 DistanceFrom 属性的值。
本示例为所选内容的每个段落添加边框,并将文本与右边框的距离设置为 3 磅。
With Selection.Paragraphs.Borders
.Enable = True
.DistanceFromRight = 3
End With
本示例为活动文档中第一节的每页添加单线型页面边框。然后将左右边框与相应的页面边缘的距离设置为 22 磅。
Dim borderLoop As Border
With ActiveDocument.Sections(1)
For Each borderLoop In .Borders
borderLoop.LineStyle = wdLineStyleSingle
borderLoop.LineWidth = wdLineWidth050pt
Next borderLoop
With .Borders
.DistanceFrom = wdBorderDistanceFromPageEdge
.DistanceFromLeft = 22
.DistanceFromRight = 22
End With
End With