DistanceFromTop Property

Applies To

Borders collection object.

Description

Returns or sets the space (in points) between the text and the top border. Read/write Long.

Note Using this property with a page border, you can set either the space between the text and the top page border or the space between the top edge of the page and the top page border. Where the distance is measured from depends on the value of the DistanceFrom property.

See Also

DistanceFrom property, DistanceFromBottom property, DistanceFromLeft property, DistanceFromRight property.

Example

This example adds a border around each paragraph in the selection and sets the distance between the text and the top border to 3 points.

With Selection.Borders
    .Enable = True
    .DistanceFromTop = 3
End With
This example adds a border around each page in the first section in the selection. The example also sets the distance between the text and the page border to 6 points.

With Selection.Sections(1)
    For Each aBorder In .Borders
        aBorder.ArtStyle = wdArtSeattle
        aBorder.ArtWidth = 22
    Next aBorder
    With .Borders
        .DistanceFrom = wdBorderDistanceFromText
        .DistanceFromTop = 6
        .DistanceFromLeft = 6
        .DistanceFromBottom = 6
        .DistanceFromRight = 6
    End With
End With