Creates a custom menu bar in Word.
WMENU must be used with WADDINS and WORDWAIT commands.
Syntax
CHGVAR |
VAR(&CMD) VALUE('WMENU') |
CHGVAR |
VAR(&PARM1) VALUE(' Captions="Buttons
labels" [;Remove] ') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD)
PARM(&HANDLE &CMD &OPT &PARM1 + |
Parameters
Parameters |
|
Parm1 |
Tips
:
Displays a tooltip for each button. Remove : removes the previous menu. |
|
|
Notes
1)
The add-in "LNCWordAddin.dot" must be loaded by the WADDINS command before using WMENU.
When the WORDWAIT command is called, the AS/400 program waits for an action on the part of the user. He takes again the hand when Word is closed, or on the action of one of the buttons of the new menu.
When returning from the WORDWAIT command, the &RESULT variable contains the 5-digit number of the actuated button (from 1 to n).
2)
The custom menu will appear into the "add-in" tab of the Word menu.
Example
CHGVAR |
VAR(&CMD) VALUE('WADDINS') |
CHGVAR |
VAR(&PARM1) VALUE(‘%LNCDIR%\ LNCWordAddin.dot’) |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD)
PARM(&HANDLE &CMD &OPT &PARM1 + |
|
|
CHGVAR |
VAR(&CMD) VALUE('WMENU') |
CHGVAR |
VAR(&PARM1) VALUE('Captions="To validate;to cancel";Tips="to validate the document;to give up the document"') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD)
PARM(&HANDLE &CMD &OPT &PARM1 + |
|
|
CHGVAR |
VAR(&CMD) VALUE('WORDWAIT') |
CHGVAR |
VAR(&PARM1) VALUE(' ') |
CHGVAR |
VAR(&PARM2) VALUE(' ') |
CALL |
PGM(LNCCMD)
PARM(&HANDLE &CMD &OPT &PARM1 + |