PageSetup 对象

         
多种对象
PageSetup
多种对象

本对象代表页面设置说明。PageSetup 对象包含了文档的所有页面设置属性(左边距、下边距、纸张大小等)。

使用 PageSetup 对象

可用 PageSetup 属性返回 PageSetup 对象。下例将活动文档的第一节设为横向并打印该文档。

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

下列示例设置“Sales.doc”文档的所有边距。

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