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

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"
[;Tips="Tooltips"]

[;Remove]

')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

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

 

 

Parameters

 

Parameters

 

Parm1


Captions :
Lets you label each button of the new menu bar.
The labels are separated from each other by a semicolon (;).
The number of labels determines the number of buttons on the menu bar.

Tips : Displays a tooltip for each button.
The tips are separated from each other by a semicolon (;). Their number must match the number of labels.

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 +
&PARM2 &RESULT)

 

 

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 +
&PARM2 &RESULT)

 

 

CHGVAR

VAR(&CMD) VALUE('WORDWAIT')

CHGVAR

VAR(&PARM1) VALUE(' ')

CHGVAR

VAR(&PARM2) VALUE(' ')

CALL

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