<< Click to Display Table of Contents >> PageSetup (object) |
Access paths:
▪Application à Documents à Item à PageSetup
▪Application à ActiveDocument à PageSetup
1 Description
The PageSetup object contains the page settings of the Document obejct to which it belongs. You can use it to determine and change the paper size, page size and margins as well as the orientation of a document.
2 Access to the object
Each open document has exactly one instance of the PageSetup object. It is accessed through Document.PageSetup:
' Set the left margin of the page to 2cm
tm.ActiveDocument.PageSetup.LeftMargin = tm.CentimetersToPoints(2)
Note: TextMaker allows you to divide a document into multiple chapters and then define different page settings for each of them. In this case, the PageSetup object always refers to the page settings of the chapter where the text cursor is placed at the moment.
3 Properties, objects, collections and methods
Properties:
▪LeftMargin
▪RightMargin
▪TopMargin
▪BottomMargin
▪PageHeight
▪PageWidth
▪Orientation
▪PaperSize
Objects:
▪Application → Application
▪Parent → Document
LeftMargin (property)
Data type: Single
Gets or sets the left page margin of the document in points (1 point corresponds to 1/72 inches).
RightMargin (property)
Data type: Single
Gets or sets the right page margin of the document in points (1 point corresponds to 1/72 inches).
TopMargin (property)
Data type: Single
Gets or sets the top page margin of the document in points (1 point corresponds to 1/72 inches).
BottomMargin (property)
Data type: Single
Gets or sets the bottom page margin of the document in points (1 point corresponds to 1/72 inches).
PageHeight (property)
Data type: Single
Gets or sets the page height of the document in points (1 point corresponds to 1/72 inches).
If you set this property, the PaperSize property (see below) will be automatically changed to a suitable paper format.
PageWidth (property)
Data type: Single
Gets or sets the page width of the document in points (1 point corresponds to 1/72 inches).
If you set this property, the PaperSize property (see below) will be automatically changed to a suitable paper format.
Orientation (property)
Data type: Long (SmoOrientation)
Gets or sets the page orientation. The following constants are allowed:
smoOrientLandscape = 0 ' Landscape orientation
smoOrientPortrait = 1 ' Portrait orientation
PaperSize (property)
Data type: Long (SmoPaperSize)
Gets or sets the page size of the document. The following constants are allowed:
smoPaperCustom = -1
smoPaperLetter = 1
smoPaperLetterSmall = 2
smoPaperTabloid = 3
smoPaperLedger = 4
smoPaperLegal = 5
smoPaperStatement = 6
smoPaperExecutive = 7
smoPaperA3 = 8
smoPaperA4 = 9
smoPaperA4Small = 10
smoPaperA5 = 11
smoPaperB4 = 12
smoPaperB5 = 13
smoPaperFolio = 14
smoPaperQuarto = 15
smoPaper10x14 = 16
smoPaper11x17 = 17
smoPaperNote = 18
smoPaperEnvelope9 = 19
smoPaperEnvelope10 = 20
smoPaperEnvelope11 = 21
smoPaperEnvelope12 = 22
smoPaperEnvelope14 = 23
smoPaperCSheet = 24
smoPaperDSheet = 25
smoPaperESheet = 26
smoPaperEnvelopeDL = 27
smoPaperEnvelopeC5 = 28
smoPaperEnvelopeC3 = 29
smoPaperEnvelopeC4 = 30
smoPaperEnvelopeC6 = 31
smoPaperEnvelopeC65 = 32
smoPaperEnvelopeB4 = 33
smoPaperEnvelopeB5 = 34
smoPaperEnvelopeB6 = 35
smoPaperEnvelopeItaly = 36
smoPaperEnvelopeMonarch = 37
smoPaperEnvelopePersonal = 38
smoPaperFanfoldUS = 39
smoPaperFanfoldStdGerman = 40
smoPaperFanfoldLegalGerman = 41
Application (pointer to object)
Data type: Object
Returns the Application object.
Parent (pointer to object)
Data type: Object
Returns the parent object, i.e. an object of the type Document.