View Single Post
 
Old 10-05-2021, 02:48 AM
Guessed's Avatar
Guessed Guessed is offline Windows 10 Office 2016
Expert
 
Join Date: Mar 2010
Location: Canberra/Melbourne Australia
Posts: 4,176
Guessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant futureGuessed has a brilliant future
Default

I recommend you learn a bit about table styles. They can be very complex but it is necessary because, as you have discovered, the table style can override the styles applied to the text in the table. The bolding may not apply to the entire table, often it is because you have a first row or first column highlight turned on. This macro can be used to apply styling to all selected tables
Code:
Sub TableStyler()
  Dim aTbl As Table
  For Each aTbl In Selection.Tables
    aTbl.Style = "My Table Style"
    aTbl.ApplyStyleFirstColumn = False
    aTbl.ApplyStyleRowBands = False
    aTbl.Range.Style = "Table Text"        'paragraph style for all of table
    aTbl.Rows(1).Range.Style = "Table Heading"   'paragraph style for first row
    aTbl.PreferredWidthType = wdPreferredWidthAuto
    aTbl.PreferredWidth = 100
  Next aTbl
End Sub
__________________
Andrew Lockton
Chrysalis Design, Melbourne Australia

Last edited by Guessed; 10-05-2021 at 02:49 PM.
Reply With Quote