View Single Post
  #4   Report Post  
Jezebel
 
Posts: n/a
Default

That's very neat. It will fail if the table contains any vertically merged
cells, but it may be reasonable to assume that there are none such.


"Klaus Linke" wrote in message
...
I want to modify every table (and only tables) in a document so that
the first row is set to a particular style (TableHead), and all
remaining rows are set to another particular style (TableText).

Okay, that's not completely accurate. I do want to exclude the table on
the first page as well as the tables in the headers from this style
replacement.



Hi Dan,

Something like

Dim i As Long
For i = 2 To ActiveDocument.Tables.Count
With ActiveDocument.Tables(i)
.Range.Style = ActiveDocument.Styles("TableText")
.Rows(1).Range.Style = ActiveDocument.Styles("TableHead")
End With
Next i

Greetings,
Klaus