View Single Post
  #13  
Old May 5th, 2006, 09:41 AM posted to microsoft.public.word.tables
external usenet poster
 
Posts: n/a
Default Heading Rows Repeat / Includetext - XML -XSL

Thank you, Cindy. You solved my problem! I am very impressed :-)

Just one thing further, I have search for a book describing this sort of
problems and more generally VBA in Word and Excel down to objects and
methods, do you have a good one, you use yourself?

Best regards, Peter

"Cindy M -WordMVP-" wrote:

Hi =?Utf-8?B?UGV0ZXIgQmVyZw==?=,

I have tryed your suggestion, but receives an error saying: "Cannot access
individual rows in this collection because the table has vertically merged
cells"?

"Vertically merged cells" means that not every row / column has the same
number of cells (some have been selected and merged into a single cell).

Hmmm. Since you can set the HeaderRows in the user interface, it ought to be
possible using a macro. We just have to out-smart Word...

See if this does the job:

Sub SetHeaderRowsWithMergedCells()
Dim tbl As Word.Table

For Each tbl In ActiveDocument.Tables
tbl.Select
Selection.Cells(1).Select
Selection.Expand wdRow
Selection.Rows.HeadingFormat = True
Next
End Sub


Cindy Meister
INTER-Solutions, Switzerland
http://homepage.swissonline.ch/cindymeister (last update Jun 8 2004)
http://www.word.mvps.org

This reply is posted in the Newsgroup; please post any follow question or
reply in the newsgroup and not by e-mail :-)