DocumentBase.PageSetup Property

Definition

Gets or sets a PageSetup that is associated with the document.

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

Property Value

PageSetup

A PageSetup that is associated with the document.

Examples

The following code example changes the orientation of the document to landscape. To use this example, run it from the ThisDocument class in a document-level project.

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 

Applies to