UseWord2002TableStyleRules Class

Emulate Word 2002 Table Style Rules.When the object is serialized out as xml, its qualified name is w:useWord2002TableStyleRules.

Inheritance Hierarchy


Namespace:  DocumentFormat.OpenXml.Wordprocessing
Assembly:  DocumentFormat.OpenXml (in DocumentFormat.OpenXml.dll)


Public Class UseWord2002TableStyleRules _
    Inherits OnOffType
Dim instance As UseWord2002TableStyleRules
public class UseWord2002TableStyleRules : OnOffType


[ISO/IEC 29500-1 1st Edition] useWord2002TableStyleRules (Incorrectly Display Top Border of Conditional Columns)

This element specifies whether applications should incorrectly calculate the top border of conditional columns (as specified by a tblStylePr element (Part 1, § with a type attribute value of firstCol, lastCol, band1Vert, or band2Vert) under the following conditions:

  • A conditional formatting has also been defined for the first row (a tblStylePr element with a type attribute of firstRow)

  • That conditional formatting as been applied to the table using the tblLook element (Part 1, §17.4.56)

Typically, table styles are applied according to the logic defined in Part 1, §17.7.2. This element, when present with a val attribute value of true (or equivalent), specifies that the top border of those conditionally formatted columns should instead be displayed as the top border of the following row.

[Example: Consider a WordprocessingML document with table style that defines two conditional formats:

The first column has a one point border

The first row has red shading

That style would be defined as follows:

<w:style w:type="table" w:customStyle="1" w:styleId="TableTest">
<w:name w:val="CompatibilitySetting"/>
<w:tblStylePr w:type="firstRow">
<w:shd w:val="clear" w:color="auto" w:fill="FF0000"/>
<w:tblStylePr w:type="firstCol">
<w:top w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:left w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:bottom w:val="single" w:sz="4" w:space="0" w:color="auto"/>
<w:right w:val="single" w:sz="4" w:space="0" w:color="auto"/>

If the first column and first row formatting is applied, the table would appear as follows:


However, if this compatibility setting is turned on:

<w:useWord2002TableStyleRules />

Then the condition described by this element causes the top border defined by the conditional format for the first column to be displayed as the top border for the second column, resulting in the following output:


end example]

Parent Elements

compat (Part 1, §

This element’s content model is defined by the common boolean property definition in Part 1, §17.17.4.

© ISO/IEC29500: 2008.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


UseWord2002TableStyleRules Members

DocumentFormat.OpenXml.Wordprocessing Namespace