PreviousNext
Help > FAQ and miscellaneous > Inserting text in page header or footer
Inserting text in page header or footer

 The easiest way is to put a bookmark directly in the header or footer. Then, inserting text with WBOOKMARK command becomes possible.

SeekView displays property together with WdSeekCurrentPageHeader constant allows inserting in the header while WdSeekCurrentPageFooter constant allows inserting in the footer, then directly insert the text using WTYPETEXT or WCOPY.

 

Example :

 

PGM

LNCOPEN

LNCCMD CMD(WORDOPEN)

LNCCMD CMD(WOPENFILE) +

PARM1('%LNCDIR%\SAMPLES\MODELE_STYLE.DOC')

LNCCMD CMD(WSETPROP)PARM1(activewindow.activepane.view.seekview+

) PARM2(wdseekcurrentpageheader)

LNCCMD CMD(WTYPETEXT) PARM1('PAGE HEADER')

LNCCMD CMD(WSETPROP)PARM1(ACTIVEWINDOW.ACTIVEPANE.VIEW.SEEKVIEW+

) PARM2(WDSEEKCURRENTPAGEFOOTER)

LNCCMD CMD(WTYPETEXT) PARM1('PAGE FOOTER')

LNCCMD CMD(WORDSHOW)

LNCCLOSE

ENDPGM

 

 

Other Example :

 

PGM

LNCOPEN

LNCCMD CMD(WORDOPEN)

LNCCMD CMD(WOPENFILE) +

PARM1('%LNCDIR%\SAMPLES\MODELE_STYLE.DOC')

LNCCMD CMD(WBOOKMARK) PARM1(entetePAGE) PARM2('PAGE HEADER')

LNCCMD CMD(WBOOKMARK) PARM1(piedpage) PARM2('PAGE FOOTER')

LNCCMD CMD(WORDSHOW)

LNCCLOSE

ENDPGM