Setting a property for all tables in a Word document

W

wildetudor

I have lots of tables in my document, and would like to change them all to
have the header row repeated on the next page in case the table is split on
two pages.

Is there any other way to do this other than doing it manually for each table?

The simplest way would be, I think, if there were a style (that I don't know
of!) that governs table properties for all tables in the document. Or at
least if I could somehow select all tables in the document, and make that
setting directly, but only once for all tables (although I'd rather do it
using styles..)

Thanks for any help! I am using Word 2007 on Windows XP.
 
G

Greg

You can run a macro like:

Sub ScratchMacro()
Dim oTbl As Word.Table
For Each oTbl In ActiveDocument.Tables
oTbl.Rows(1).HeadingFormat = True
Next oTbl
End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top