返回或设置文本与上边框的距离(以磅为单位)。Long 类型,可读写。
注意 为页面边框设置该属性时,既可设置为文本与页面上边框的距离,也可以设置页面上缘与上边框的距离。使用何种参照,取决于 DistanceFrom 属性的值。
本示例为所选内容中的每个段落添加边框,并将文本与上边框的距离设置为 3 磅。
With Selection.Borders
.Enable = True
.DistanceFromTop = 3
End With
本示例为所选内容中第一节的每页添加页面边框,并将文本与页面边框的距离设置为 6 磅。
Dim borderLoop As Border
With Selection.Sections(1)
For Each borderLoop In .Borders
borderLoop.ArtStyle = wdArtSeattle
borderLoop.ArtWidth = 22
Next borderLoop
With .Borders
.DistanceFrom = wdBorderDistanceFromText
.DistanceFromTop = 6
.DistanceFromLeft = 6
.DistanceFromBottom = 6
.DistanceFromRight = 6
End With
End With