Borders.ApplyPageBordersToAllSections method (Word)
Applies the specified page-border formatting to all sections in a document.
Syntax
expression. ApplyPageBordersToAllSections
expression Required. A variable that represents a 'Borders' collection.
Example
This example adds a single-line page border to all sections in the active document.
Dim borderLoop As Border
With ActiveDocument.Sections(1)
For Each borderLoop In .Borders
With borderLoop
.LineStyle = wdLineStyleSingle
.LineWidth = wdLineWidth050pt
End With
Next borderLoop
.Borders.ApplyPageBordersToAllSections
End With
See also
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.