pb001
07-06-2011, 02:57 AM
Hi
I am creating a document template that has a number of tables within it. I can format all tables with the same heading row (HeadingFormat), set the Background color etc... My problem is I don't want to change the format of the first 3 tables in the document.
This is the code I am using:
If ActiveDocument.Tables.Count >= 1 Then
Dim objTable As Word.Table
For Each objTable In ActiveDocument.Tables
objTable.Rows(1).HeadingFormat = True
objTable.Rows(1).Shading.BackgroundPatternColor = RGB(149, 179, 215)
Next objTable
Set objTable = Nothing
End If
Is there an easy way to do this?
Thanks
I am creating a document template that has a number of tables within it. I can format all tables with the same heading row (HeadingFormat), set the Background color etc... My problem is I don't want to change the format of the first 3 tables in the document.
This is the code I am using:
If ActiveDocument.Tables.Count >= 1 Then
Dim objTable As Word.Table
For Each objTable In ActiveDocument.Tables
objTable.Rows(1).HeadingFormat = True
objTable.Rows(1).Shading.BackgroundPatternColor = RGB(149, 179, 215)
Next objTable
Set objTable = Nothing
End If
Is there an easy way to do this?
Thanks