J
Joe
I am using Word 2002 and have several tables in my document. Here is the code that I have that formats the borders in my tables after all of them have been created
Dim tbl As Word.Tabl
For Each tbl In ActiveDocument.Table
With tbl.Border
.Enable = Tru
.InsideLineStyle = wdLineStyleSingl
.OutsideLineStyle = wdLineStyleSingl
End Wit
Next tb
What I want to do is not have the horizontal lines appear in the first table. I know that to do this I would use the following
tbl.Borders(wdBorderHorizontal).LineStyle = wdLineStyleNon
What I don't know how to do is identify the first table. There is no Index property
Do I need to do this ((I really just don't want to. I want to use a For Each instead of a For loop.)
Dim i As Intege
For i = 1 To ActiveDocument.Tables.Coun
With Table(i).Border
.Enable = Tru
.InsideLineStyle = wdLineStyleSingl
.OutsideLineStyle = wdLineStyleSingl
End Wit
If i = 1 then Table(i).Borders(wdBorderHorizontal).LineStyle = wdLineStyleNon
Next
Any information would be greatly appreciated
Thanks
Joe
Dim tbl As Word.Tabl
For Each tbl In ActiveDocument.Table
With tbl.Border
.Enable = Tru
.InsideLineStyle = wdLineStyleSingl
.OutsideLineStyle = wdLineStyleSingl
End Wit
Next tb
What I want to do is not have the horizontal lines appear in the first table. I know that to do this I would use the following
tbl.Borders(wdBorderHorizontal).LineStyle = wdLineStyleNon
What I don't know how to do is identify the first table. There is no Index property
Do I need to do this ((I really just don't want to. I want to use a For Each instead of a For loop.)
Dim i As Intege
For i = 1 To ActiveDocument.Tables.Coun
With Table(i).Border
.Enable = Tru
.InsideLineStyle = wdLineStyleSingl
.OutsideLineStyle = wdLineStyleSingl
End Wit
If i = 1 then Table(i).Borders(wdBorderHorizontal).LineStyle = wdLineStyleNon
Next
Any information would be greatly appreciated
Thanks
Joe