HeadingFormat Property

Microsoft Word Visual Basic

HeadingFormat Property

       

True if the specified row or rows are formatted as a table heading. Rows formatted as table headings are repeated when a table spans more than one page. Can be True, False or wdUndefined. Read/write Long.

Example

This example creates a 5x5 table at the beginning of the active document and then adds the table heading format to the first table row.

Dim rngTemp As Range
Dim tableNew As Table

Set rngTemp = ActiveDocument.Range(0, 0)
Set tableNewe = ActiveDocument.Tables.Add(rngTemp, 5, 5)

tableNew.Rows(1).HeadingFormat = True

This example determines whether the row that contains the insertion point is formatted as a table heading.

If Selection.Information(wdWithInTable) = True Then 
    If Selection.Rows(1).HeadingFormat = True Then _
        MsgBox "The current row is a table heading"
Else
    MsgBox "The insertion point is not in a table."
End If