JoinBorders Property

Microsoft Word Visual Basic

JoinBorders Property

       

True if vertical borders at the edges of paragraphs and tables are removed so that the horizontal borders can connect to the page border. Read/write Boolean.

expression.JoinBorders

expression   Required. An expression that returns a Borders object.

Example

This example adds a border around each page in the first section of 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.

Dim borderLoop As Border

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