DocumentBase.PageSetup 属性

定义

获取或设置一个与文档关联的 PageSetup

public Microsoft.Office.Interop.Word.PageSetup PageSetup { get; set; }

属性值

PageSetup

一个与文档关联的 PageSetup

示例

下面的代码示例将文档的方向更改为横向。 若要使用此示例,请在 ThisDocument 文档级项目的类中运行它。

private void DocumentPageSetup()
{
    this.PageSetup.Orientation = Microsoft.Office.
        Interop.Word.WdOrientation.wdOrientLandscape;
}
Private Sub DocumentPageSetup()
    Me.PageSetup.Orientation = Microsoft.Office.Interop.Word.WdOrientation. _
        wdOrientLandscape
End Sub 

适用于