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

 

Copy the current selection or the contents of a bookmark to the clipboard or to another bookmark.

 

Syntax

 

CHGVAR

VAR(&CMD) VALUE('WCOPY')

CHGVAR

VAR(&PARM1) VALUE('
[From="Bookmark source"];
[To="Bookmark of destination"];

[Count=Number]

')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

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

&PARM2 &RESULT)

 

 Parameters

 

Parameters

 

Parm1

From : Indicates document bookmark which content must be copied.
If From is not defined, the current selection will be copied to the clipboard.

 

To : Indicates document bookmark to copy to.
If To is not defined, data can only be copied to the clipboard. 

 

Count : Indicates the copies number.
This parameter is only valid if To is defined.

 

 

 

Examples

 

The following example copies the value 123 456.78 from "Line1" to the clipboard.

 

CHGVAR VAR(&CMD) VALUE('WORDOPEN')

CHGVAR VAR(&PARM1) VALUE('FILE ="C:\TEMP\TEST.DOC"')

CHGVAR VAR(&PARM2) VALUE('VISIBLE')

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

&PARM2 &RESULT)

 

CHGVAR VAR(&CMD) VALUE('WBOOKMADD')

CHGVAR VAR(&PARM1) VALUE('Ligne1')

CHGVAR VAR(&PARM2) VALUE(' ')

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

&PARM2 &RESULT)

 

CHGVAR VAR(&CMD) VALUE('WBOOKMARK')

CHGVAR VAR(&PARM1) VALUE('Ligne1;NUMFMT(2 DECPOINT=, GRPPOINT=.)')

CHGVAR VAR(&PARM2) VALUE('12345678')

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

&PARM2 &RESULT)

 

CHGVAR VAR(&CMD) VALUE('WSELECT')

CHGVAR VAR(&PARM1) VALUE('*LINE')

CHGVAR VAR(&PARM2) VALUE(' ')

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

&PARM2 &RESULT)

 

CHGVAR VAR(&CMD) VALUE('WCOPY')

CHGVAR VAR(&PARM1) VALUE(' ')

CHGVAR VAR(&PARM2) VALUE(' ')

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

&PARM2 &RESULT)

 

In the following example, "Ligne1" content will be copied 10 times to "Ligne2" position.

CHGVAR

VAR(&CMD) VALUE('WCOPY)

CHGVAR

VAR(&PARM1) VALUE('From ="Ligne1";To="Ligne2";Count=10')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

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

&PARM2 &RESULT))

MONMSG

MSGID(LNC0000) EXEC(GOTO CMDLBL(ERROR))

 

In the following example, the current selection is copied to the clipboard.

CHGVAR

VAR(&CMD) VALUE('WCOPY)

CHGVAR

VAR(&PARM1) VALUE(' ')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

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

&PARM2 &RESULT))

MONMSG

MSGID(LNC0000) EXEC(GOTO CMDLBL(ERROR))

 

See also

 

WPASTE

WSELECT