Borders.ApplyPageBordersToAllSections 方法 (Word)

将指定的页面边框格式应用于文档中的所有节。

语法

expression. ApplyPageBordersToAllSections

表达式是必需的。 一个代表“Borders”集合的变量。

示例

本示例为活动文档的所有节添加单线型页面边框。

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

另请参阅

边框集合对象

支持和反馈

有关于 Office VBA 或本文档的疑问或反馈? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。