Copy row Properties

M

Maanu

I have changed the first row properties of a table to make it the table
header. I changed its color to grey and changed font to verdana + bold.

I want to change the first row properties of all other tables(around 200
tables) in the document in the same way. I used paste special functionality
to chage the row properties of all other tables. But nothing happened.

Is there any meachanisms for doing this?

Thanks!
 
G

Graham Mayor

You could use a macro to format the tables

The following will format all the first rows to have a 25% grey background
and Verdana Bold font

Dim oDoc As Document
Dim oTable As Table
Set oDoc = ActiveDocument
On Error Resume Next
For Each oTable In ActiveDocument.Tables
With oTable.Rows(1).Range
.Font.Name = "Verdana"
.Bold = True
.Shading.BackgroundPatternColor = wdColorGray25
End With
Next oTable

This will work provided none of the first rows have vertically merged cells.
Tables that have such merged header cells will be ignored.

http://www.gmayor.com/installing_macro.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

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