DistanceFromRight Property Example
This example adds a border around each paragraph in the selection and sets the distance between the text and the right border to 3 points.
With Selection.Paragraphs.Borders
.Enable = True
.DistanceFromRight = 3
End With
This example adds a single border around each page in section one in the active document. The example also sets the distance between the right and left border and the corresponding edges of the page to 22 points.
With ActiveDocument.Sections(1)
For Each aBord In .Borders
aBord.LineStyle = wdLineStyleSingle
aBord.LineWidth = wdLineWidth050pt
Next aBord
With .Borders
.DistanceFrom = wdBorderDistanceFromPageEdge
.DistanceFromLeft = 22
.DistanceFromRight = 22
End With
End With