Udostępnij za pośrednictwem


DocumentBase.PageSetup Property

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

Namespace:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Syntax

'Declaration
Public Property PageSetup As PageSetup
    Get
    Set
public PageSetup PageSetup { get; set; }

Property Value

Type: Microsoft.Office.Interop.Word.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 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 Security

See Also

Reference

DocumentBase Class

Microsoft.Office.Tools.Word Namespace