4D Write v16

WR INSERT PAGE NUMBER

Home

 
4D Write v16
WR INSERT PAGE NUMBER

WR INSERT PAGE NUMBER 


 

WR INSERT PAGE NUMBER ( area ; format ; typeNum ) 
Parameter Type   Description
area  Longint in 4D Write area
format  Integer in Format type
typeNum  Integer in Number to insert 0 = Page number, 1 = Total number of pages

The WR INSERT PAGE NUMBER command allows you to insert, at the cursor location, a reference that displays the current page number or the total number of pages. This reference can be placed in the main text, footer or header area. You can use the WR SET FRAME command to place the cursor in whichever area you choose.

format allows you to choose the display format for the reference to insert. In this parameter, you can pass one of the following constants of the WR Page number formats theme:

Constant Type Value Comment
wr 123 Longint 0 1, 2, 3...
wr abc Longint 1 a, b, c...
wr ABC Longint 2 A, B, C...
wr i ii iii Longint 3 i, ii, iii...
wr I II III Longint 4 I, II, III...

The typeNum optional parameter allows you to insert either the current page number or the total page count of the current documet. If you pass the constant wr page number (value 0) or if you omit this parameter, the current page number will be inserted. If you pass the constant wr total number of pages (value 1), the total number of pages of the document will be inserted.

Example  

The following method (OddPages) is attached to a variable inserted in the footer of the current document:

  `Checking if the "Different on left and right pages" mode is already activated
 If(WR Get doc property(Area;wr different left right pages)#1)
  `If not, activating this mode
    WR SET DOC PROPERTY(Area;wr different left right pages;1)
    ALERT("Warning: the document is now in 'Different on left and right pages' mode!")
 End if
  `Setting the cursor in the left footer
 WR SET FRAME(Area;wr left footer)
  `Inserting 'Page X' in roman uppercase
 WR INSERT TEXT(Area;"Page ")
 WR INSERT PAGE NUMBER(Area;wr i ii iii;wr page number)
 WR INSERT TEXT(Area;" on ")
 WR INSERT PAGE NUMBER(Area;wr i ii iii;wr total number of pages)



See also 

WR GET PAGE NUMBER FORMAT
WR SET FRAME

 
PROPERTIES 

Product: 4D Write
Theme: WR Database Objects
Number: 89473

 
HISTORY 

Modified: 4D Write 6.5.3

 
ARTICLE USAGE

4D Write Language ( 4D Write v16)