Writes the value of a document variable to the cursor location in the current Word document.
This variable may have been created or modified using the WSETVAR command.
Syntax
CHGVAR |
VAR(&CMD) VALUE('WREFVAR') |
CHGVAR |
VAR(&PARM1) VALUE(' Text="Variable name" ') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD) PARM(&HANDLE &CMD &OPT &PARM1 + &PARM2 &RESULT) |
Parameters
Parameters |
|
Parm1 |
|
|
The value of the variable will be written to the current Word document at the cursor location. |
Example
In the following example, we place ourselves on the bookmark "VAR7RES", and we assign it the value of the variable "VAR7":
LNCCMD CMD(WOPENFILE) PARM1('C:\A\Test.docx')
LNCCMD CMD(WBOOKMARK) PARM1('BOOKMARK="VAR7RES"')
LNCCMD CMD(WREFVAR) PARM1('Text="VAR7"')
See also
• WSETVAR