This feature allows us to format multiple tables at once in Word. It follows the same logic as in the regular way of formatting and creating tables, but here we can apply the formatting to each table in the selection.
Further, we can configure the feature to either show all table designs in a menu or specify a certain design in a single button. In the first way, we use a dynamic menu, where we create button inside with the "special" attribute, and thus the user is allowed to choose which design that should be applied. In the second way, we create a normal button where we define the specific design and variant that should be applied.
CMD
<Cmd case="SkabelonDesign.CorporateTables:FormatMulti"/>
Parameters
The following parameters are only to be used if the feature should be configured as a single button.
DesignPath
Define the path to the table template. The table template must be located inside the folder called Content\SkabelonDesign.CorporateTables
, and can be located in sub folders in here. If the json file is not located in sub folders, the path must be defined with the file name, e.g. "FileName.json"
. If the file is in sub folders, these must be defined as well, e.g. "SubFolder/SubFolder/FileName.json"
and so on.
Variant
Define the name of the variant in the table template that you want to apply. Have a look at your table template and use the same value as defined in the parameter "Name"
.
Examples of usage
The first example illustrates how the feature can be configured as a menu. Here it will show all table templates that are located in the Content\SkabelonDesign.CorporateTables\tables
folder.
<DynamicMenu label="Format tables">
<Button special="SkabelonDesign.CorporateTables:Table">
<Cmd case="SkabelonDesign.CorporateTables:FormatMulti"/>
</Button>
</DynamicMenu>
The second example illustrates how the feature can be configured as a single button. In this case, it will apply the variant "Yellow"
from the table template called "Tables.json"
.
<Button label="Design" icon="TableStylesGalleryExcel">
<Cmd case="SkabelonDesign.CorporateTables:FormatMulti" DesignPath="tables/Tables.json" Variant="Yellow"/>
</Button>
Comments
0 comments
Article is closed for comments.