[Table of Contents] [docx version]

WordprocessingML Reference Material - Table of Contents

hMerge (Horizontally Merged Cell)

This element specifies that this cell is part of a horizontally merged set of cells in a table. The val attribute on this element determines how this cell is defined with respect to the previous cell in the table (i.e. does this cell continue the horizontal merge or start a new merged group of cells).

[Note: This property is maintained for compatibility with legacy word processing documents which defined tables in this manner. Whenever possible, this form or horizontal merges should not be produced, and should be translated to the appropriate gridSpan2.4.13) settings on the table cells instead. end note]

If this element is omitted, then this cell shall not be part of any horizontally merged grouping of cells, and any horizontal merge group in the preceding cells shall be closed.

[Example: Consider a table with one row and three columns with the last two columns horizontally merged:

 

 

 

The second cell in the first row starts a merge that is completed in the right adjacent cell, resulting in the following WordprocessingML:

<w:tbl>

<w:tr>
<w:tc>

</w:tc>
<w:tc>
<w:tcPr>
<w:hmerge w:val="restart"/>
</w:tcPr>

</w:tc>
<w:tc>
<w:tcPr>
<w:hmerge/>
</w:tcPr>

</w:tc>
</w:tr>
</w:tbl>

The hmerge element defines the cells which are horizontally merged, and how each group is merged together. end example]

Parent Elements

tcPr2.7.5.8); tcPr2.4.66); tcPr2.7.5.9); tcPr2.4.67)

 

Attributes

Description

val (Horizontal Merge Type)

Specifies how the table cell is part of a horizontally merged region. This determine whether the cell should join onto an existing grouping of merged cells if any exist, or start a new group of merged cells. Refer to the simple type definition for a full description of each type.

 

If this attribute is omitted, its value shall be assumed to be continue.

 

[Example: Consider a table cell where a horizontal cell merge begins represented as the following WordprocessingML:

<w:tcPr>

<w:hmerge w:val="restart"/>

</w:tcPr>

 

The attribute value of restart specifies that this element shall start a new horizontally merged region in this table. end example]

 

The possible values for this attribute are defined by the ST_Merge simple type2.18.64).

The following XML Schema fragment defines the contents of this element:

<complexType name="CT_HMerge">

   <attribute name="val" type="ST_Merge"/>

</complexType>