PageSetup.SetAsTemplateDefault 方法 (Word)PageSetup.SetAsTemplateDefault method (Word)

将指定的页面设置格式设为活动文档和所有基于活动模板的新文档的默认格式。Sets the specified page setup formatting as the default for the active document and all new documents based on the active template.

语法Syntax

expressionexpression. SetAsTemplateDefault

expression:必需。expression Required. 代表PageSetup对象的变量。A variable that represents a 'PageSetup' object.

示例Example

以下示例更改活动文档的左右页边距设置,然后将该页面设置格式设为默认格式。This example changes the left and right margin settings for the active document and then sets the page setup formatting as the default.

With ActiveDocument.PageSetup 
 .LeftMargin = InchesToPoints(1) 
 .RightMargin = InchesToPoints(1) 
 .SetAsTemplateDefault 
End With

另请参阅See also

对于 PageSetup 对象PageSetup Object