Share via


DocumentBase.PageSetup 屬性

取得或設定與文件相關聯的 PageSetup

命名空間:  Microsoft.Office.Tools.Word
組件:  Microsoft.Office.Tools.Word.v4.0.Utilities (在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)

語法

'宣告
Public Property PageSetup As PageSetup
public PageSetup PageSetup { get; set; }

屬性值

型別:Microsoft.Office.Interop.Word.PageSetup
與文件相關聯的 PageSetup

範例

下列程式碼範例會將文件的方向變更為橫向。 若要使用這個範例,請在文件層級專案中的 ThisDocument 類別執行。

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

.NET Framework 安全性

請參閱

參考

DocumentBase 類別

Microsoft.Office.Tools.Word 命名空間