BaseExtensions can be used to change color for table fill or border based on table name in Word.
<Cmd case="BaseExtensions:table-fill" first-cell="x,x" last-cell="x,x" table-name="x" color="x,x,x"/>
Description: Fills the table color of a named table for the first-cell to last-cell range.
Parameters:
first-cell
Format is x,y, where x or y must be a number or "f" (for first) or "l" (for last) followed by a number, e.g. f1,l1. First will start from left/top, while last will start from bottom/right. Furthermore, last cell represents the end of the range.
x,y is a pair of horizontal and vertical indexes (with offset).
last-cell
Same format as in first-cell.
table-name
Name of table(s) to be changed.
color
Use RGB for the color of the fill, e.g. "255,255,255".
<Cmd case="BaseExtensions:table-line" first-cell="x,x" last-cell="x,x" table-name="x" color="x,x,x" border-position="x"/>
Description: Sets the border color of a named table for the first-cell to last-cell ranged on the position defined.
Parameters:
first-cell
Format is x,y, where x or y must be a number or "f" (for first) or "l" (for last) followed by a number, e.g. f1,l1. First will start from left/top, while last will start from bottom/right. Furthermore, last cell represents the end of the range.
x,y is a pair of horizontal and vertical indexes (with offset).
last-cell
Same format as in first-cell.
table-name
Name of table(s) to be changed.
color
Use RGB for the color of the fill, e.g. "255,255,255".
border-position
left
Left border.
right
Right border.
top
Top border.
bottom
Bottom border.
For instance, use these commands:
<Cmd case="BaseExtensions:table-fill" first-cell="1,1" last-cell="1,l1" table-name="test" color="0,54,232"/>
<Cmd case="BaseExtensions:table-line" first-cell="l1,1" last-cell="l1,l1" table-name="test" color="0,54,232" border-position="bottom"/>
And this is how the table will be colored:
Comments
0 comments
Article is closed for comments.