From: Nick on
I have been having an issue with applying new styles to existing tables in Word 2007 stripping away the bolding of the first row which contains the headings for all the columns. Is there a way to loop through the tables and apply this formatting? Also the first table in the document does not need the bold, is there a way to exclude the loop from applying to the first table in the word document? Thanks for any help that can be provided.


Submitted via EggHeadCafe - Software Developer Portal of Choice
Rounded corner content editor web part with custom colors
http://www.eggheadcafe.com/tutorials/aspnet/462e29fe-2258-45c0-bd65-e67a1c071601/rounded-corner-content-ed.aspx
From: DaveLett on
Hi Nick,

I think you're looking for something like the following:
'''remove bold face formatting from the first row
'''of every table except for the first table
Dim lTbl As Long

For lTbl = 2 To ActiveDocument.Tables.Count
ActiveDocument.Tables(lTbl).Rows(1).Range.Font.Bold = False
Next lTbl

HTH,
Dave