Borders.DistanceFromLeft 属性 (Word)

返回或设置文本与左边的框之间的距离 (以磅为单位)。 读/写 Long

语法

expressionDistanceFromLeft

表达 一个代表“Borders”对象的变量。

备注

对页面边框使用本属性,可设置文本与左边的框或页面的左边的缘与左边的框的距离之间距离。 距离距离取决于 DistanceFrom 属性的值。

示例

本示例为活动文档中的每个图文框添加边框,并且将图文框与边框的距离设置为 5 磅。

Dim frameLoop As Frame 
 
For Each frameLoop In ActiveDocument.Frames 
 With frameLoop.Borders 
 .Enable = True 
 .DistanceFromLeft = 5 
 .DistanceFromRight = 5 
 .DistanceFromTop = 5 
 .DistanceFromBottom = 5 
 End With 
Next frameLoop

本示例为活动文档的第一个段落添加边框,并将文本与左边框的距离设置为 3 磅。

With ActiveDocument.Paragraphs(1).Borders 
 .Enable = True 
 .DistanceFromLeft = 3 
End With

另请参阅

边框集合对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。