JoinBorders Property Example

This example add a border around each page in the first section in the selection. The example also removes the horizontal borders at the edges of tables and paragraphs, thus connecting the horizontal borders to the page border.

With Selection.Sections(1)
    For Each aBord In .Borders
        aBord.ArtStyle = wdArtBalloonsHotAir
        aBord.ArtWidth = 15
    Next aBord
    With .Borders
        .DistanceFromLeft = 2
        .DistanceFromRight = 2
        .DistanceFrom = wdBorderDistanceFromText
        .JoinBorders = True
    End With
End With