PreviousNext
Help > Programming with LAUNCHER Office > LNCCMD commands > Commands list > WBOOKMADD command
WBOOKMADD command

Adds a bookmark to the current cursor position.

 

Bookmark name must be Word compatible.
Current selection is identified with added bookmark name.
Using WBOOKMARK command, the program will find this particular position later on.

 

Syntax 

 

CHGVAR

VAR(&CMD) VALUE('WBOOKMADD')

CHGVAR

VAR(&PARM1) VALUE('
Bookmark="Name of bookmark to insert"] 

[;Text="Text to insert" ]

')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 +

&PARM2 &RESULT)

 

 

Parameters

 

Parameters

 

Parm1

Bookmark : Name of the bookmark to insert in the current document.

 

Text : The value of the text to insert at the location of the created bookmark. Optional.

 

Example

 

 DCL        VAR(&FILE) TYPE(*CHAR) LEN(2000)             

 DCL        VAR(&PATH) TYPE(*CHAR) LEN(2000)             

                                                         

 CHGVAR     VAR(&PATH) VALUE('C:\A\')                    

 CHGVAR     VAR(&FILE) VALUE('res.docx') 

               

 LNCOPEN    SVRADDR('*DEV')   

                          

 LNCCMD     CMD(WORDOPEN)                                

                                                         

 LNCCMD     CMD(WOPENFILE) PARM1(&PATH *TCAT &FILE)      

                                                         

 LNCCMD     CMD(WBOOKMADD) +                             

              PARM1('Bookmark="Name";Text="Client name"')

 

 LNCCMD     CMD(WSAVEAS) +                               

              PARM1('FILE="C:\A\testBookmarkAdd.docx"')

 

 LNCCMD     CMD(WORDCLOSE)                               

                                                         

 LNCCLOSE

 

See also

 

WBOOKMARK