Document.PageSetup Property (2007 System)

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

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

Syntax

'Declaration
<BrowsableAttribute(False)> _
Public Property PageSetup As PageSetup
'Usage
Dim instance As Document 
Dim value As PageSetup 

value = instance.PageSetup

instance.PageSetup = value
[BrowsableAttribute(false)]
public PageSetup PageSetup { get; set; }
[BrowsableAttribute(false)]
public:
property PageSetup^ PageSetup {
    PageSetup^ get ();
    void set (PageSetup^ value);
}
public function get PageSetup () : PageSetup 
public function set PageSetup (value : PageSetup)

Property Value

Type: PageSetup
A PageSetup that is associated with the document.

Examples

The following code example changes the orientation of the document to landscape.

This example is for a document-level customization.

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

Document Class

Document Members

Microsoft.Office.Tools.Word Namespace