ApplyPageBordersToAllSections Method

Applies To

Borders collection object.

Description

Applies the specified page-border formatting to all sections in a document.

Syntax

expression.ApplyPageBordersToAllSections

expression   An expression that returns a Borders object.

See Also

EnableFirstPageInSection property, EnableOtherPagesInSection property.

Example

This example adds a single-line page border to all sections in the active document.

With ActiveDocument.Sections(1)
    For Each aBord In .Borders
        aBord.LineStyle = wdLineStyleSingle
        aBord.LineWidth = wdLineWidth050pt
    Next aBord
    .Borders.ApplyPageBordersToAllSections
End With