WksPageSetup Object

 

The WksPageSetup object contains all the parameters in the worksheet window Page Setup dialog.

 

Properties

AdjustToPercentage

Application

BottomMargin

CenterHorizontally

CenterVertically

FitToPagesAcross

FitToPagesDown

Footer

FooterMargin

Header

HeaderMargin

LeftMargin

Orientation

PaperSize

PaperSource

Parent

PrintAcrossAndThenDown

PrintBlackAndWhite

PrintGridlines

PrintRowAndColumnHeader

RightMargin

TopMargin

 

Example

The following script demonstrates how the WksPageSetup object is used in reference to the WksDocument object.

 

Sub Main

'Declares mvApp as an object

 Dim mvApp As Object

 

'Creates an instance of the MapViewer Application

'object and assigns it to the variable named "mvApp"

 Set mvApp = CreateObject("MapViewer.Application")

 

'Makes MapViewer visible

 mvApp.Visible = True

 

'Declares Wks as an object

 Dim Wks As Object

 

'Creates a worksheet document in MapViewer

'and assigns it to the variable named"Wks"

 Set Wks = mvApp.Documents.Add(mvDocWks)

 

'Declares WksPageSetup as an object

 Dim WksPageSetup As Object

 

'Assigns the worksheet document page setup

'to the variable named "WksPageSetup"

 Set WksPageSetup = Wks.PageSetup

End Sub