Lock Word - effective code construction (W)

Modified on Mon, 5 Oct at 1:54 PM

If you make e.g. buttons with many commands, it can be useful to lock Word, as the first command. This will reduce loading time and make Word work more efficient.

This is done by adding a Word Locker as the first command in the code. The code is listed below:

<Cmd case="BaseExtensions:lock-word"/>

An example could be a button named Forside A, as follows:

XML
<Button label="Forside A" icon="FrontpageA_Icon.png" size="large" 

<Cmd case="BaseExtensions:lock-word"/>
<Cmd case="BaseExtensions:table-text-align" name="FrontpageTitle" vertical="top" horizontal="left" />
<Cmd case="BaseExtensions:shape-hide" contains="FrontpageShape_B"/> 
<Cmd case="BaseExtensions:shape-hide" contains="Frontpage Logo_On no background"/>
<Cmd case="BaseExtensions:shape-show" contains="Frontpage Bottom shape"/> 
<Cmd case="BaseExtensions:shape-show" contains="Frontpage Logo_On whitebackground"/>>

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article