Forum Discussion
Table Styles and the Ribbon Table Design>Table Option Checkboxes
This is, this issue happened in Word 2019 and later versions, including Word 2021 and Microsoft 365.
https://learn.microsoft.com/en-us/office/vba/api/word.conditionalstyle
https://learn.microsoft.com/en-us/office/vba/api/word.tablestyle.condition
- cdrgregApr 12, 2026Copper Contributor
What do you mean by "This is"
Is it resolved in versions after 2019 or is it (by it meaning all the issues described) still broken?
I am familiar with both links. The code in both doesn't work. Even if it did, the user would still have to select the table, select Table Design and check the box for Total Row and BandedColumns. - cdrgregApr 12, 2026Copper Contributor
To get the code in the first link to actually work, you could combine the two. Still the Banded Columns and Total Row formatting will not be applied:
Sub ApplyConditionalStyle() With ActiveDocument .Tables(1).Select 'Assumes the table select is formatted with "Table Grid" style With .Styles("Table Grid").Table .ColumnStripe = 1 .RowStripe = 1 .Condition(wdOddColumnBanding).Shading _ .BackgroundPatternColor = wdColorGray10 .Condition(wdOddRowBanding).Shading _ .BackgroundPatternColor = wdColorGray10 .Condition(wdFirstRow).Borders(wdBorderBottom) _ .LineStyle = wdLineStyleDouble .Condition(wdFirstColumn).Borders(wdBorderRight) _ .LineStyle = wdLineStyleDouble .Condition(wdLastRow).Borders(wdBorderTop) _ .LineStyle = wdLineStyleDouble End With End With End Sub - cdrgregApr 11, 2026Copper Contributor
Kidd_Ip,
I am familiar with the links.
The code in the examples don't work. If it did, it still doesn't display all of the the formatting the user obviously just wanted to see in his or her document with first selecting the table and then checking the box to display Column banding and Last Row.
Utterly stupid functionality.