Add/remove columns (W)

Modified on Mon, 5 Oct at 1:53 PM

With BaseExtensions, we are able to toggle between number of columns on a page in Word or prompt the user for a specific number of columns to be added.

Toggle Columns

This feature can be used alone or in conjunction with landscape pages.

Module is located here:

Code
...\ModuleLibrary\BaseExtensions\01_nocontext_Tools\69_W_toggleColumns.xml

CMD

<Cmd case="BaseExtensions:change-col-numbers" colNo1="x" colNo2="x" nextSec="x"/>

Parameters:

colNo1

Define the first number of columns that the command should be able to change to.

colNo2

Define the second number of columns that the command should be able to change to.

nextSec

Define whether the command should jump to the next section and toggle column sizes there. If it should, define this parameter to be true. This is handy when using the feature in conjunction with landscape pages as when the new landscape page is inserted, it needs to jump to the new page to toggle the number of columns there. For just toggling the current section, define parameter to be false.

Define number of columns

This feature can be used to add a specific number of columns to the currently selected section of a document. It can be used in conjunction with BaseExtensions:prompt-input and/or if commands to allow highly granular control of not just the column count, but the spacing between columns.

CMD

XML
<Cmd case="BaseExtensions:change-columns" numberofcolumns="x" documentrange="x" spacing="x"/>

Parameters:

numberofcolumns

Define the number of columns that should be added.

documentrange

Takes one of the following arguments

all

Adds the defined number of columns to all sections of the document

rest

Adds the defined number of columns to the current section and all subsequent sections of the document

currentsection

Adds the defined number of columns to the current section only

spacing

Sets the space between the columns. Value in centimeters.

An example of a module using this feature can be seen here:

XML
<Button label="Change columns">
<Cmd case="BaseExtensions:prompt-input">
<Prompts>
<PromptText Title="Number of columns" Message="Input the number of columns you want to change to" ValidInput="Regex" RegexValidation="\d"/>
</Prompts>
<Commands>
<Cmd case="BaseExtensions:change-columns" numberofcolumns="$PromptText$" documentrange="currentsection" spacing="1.25"/>
</Commands>
</Cmd>
</Button>

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