PageSetup 对象(Word)PageSetup object (Word)

代表页面设置说明。Represents the page setup description. 对于 PageSetup 对象作为属性包含文档 (如左边的距、 下边距和纸张大小) 的所有页面设置属性。The PageSetup object contains all the page setup attributes of a document (such as left margin, bottom margin, and paper size) as properties.

备注Remarks

对于 PageSetup 属性用于返回 PageSetup 对象。Use the PageSetup property to return the PageSetup object. 下面的示例设置为横向活动文档中第一节,然后打印该文档。The following example sets the first section in the active document to landscape orientation and then prints the document.

ActiveDocument.Sections(1).PageSetup.Orientation = _ 
 wdOrientLandscape 
ActiveDocument.PrintOut

以下示例设置命名为"Sales.doc"的文档的所有页边距。The following example sets all the margins for the document named "Sales.doc."

With Documents("Sales.doc").PageSetup 
 .LeftMargin = InchesToPoints(0.75) 
 .RightMargin = InchesToPoints(0.75) 
 .TopMargin = InchesToPoints(1.5) 
 .BottomMargin = InchesToPoints(1) 
End With

另请参阅See also

Word 对象模型参考Word Object Model Reference

支持和反馈Support and feedback

有关于 Office VBA 或本文档的疑问或反馈?Have questions or feedback about Office VBA or this documentation? 请参阅 Office VBA 支持和反馈,获取有关如何接收支持和提供反馈的指南。Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.