PageSetup Object

The PageSetup object contains all the parameters in the plot window Page Setup dialog.

The following table provides all the properties of the PageSetup object:

Property

Description

Application

Returns the application object. Its a read-only property

BottomMargin

Returns/sets the bottom margin in page units.

Height

Returns/sets the paper height in page units.

LeftMargin

Returns/sets the left margin in page units.

Orientation

Returns/sets the paper orientation.

Parent

Returns the parent object. It is a read only property.

RightMargin

Returns/sets the right margin in page units.

TopMargin

Returns/sets the top margin in page units.

Width

Returns/sets the paper width in page units.

Example

The following script demonstrates how the PageSetup object is used in reference to the PlotDocument object.

Sub Main

'Declares SurferApp as an object

Dim SurferApp As Object

'Creates an instance of the Surfer Application object and assigns it to

'the variable named "SurferApp"

Set SurferApp = CreateObject("Surfer.Application")

'Makes Surfer visible

SurferApp.Visible = True

'Declares Plot as an object

Dim Plot As Object

'Creates a plot document in Surfer and assigns it to the variable named

'"Plot"

Set Plot = SurferApp.Documents.Add(srfDocPlot)

'Declares PageSetup as an object

Dim PageSetup As Object

'Assigns the plot document page setup to the variable named "PageSetup"

Set PageSetup = Plot.PageSetup

End Sub