View Single Post
 
Old 10-05-2021, 03:02 AM
lis lis is offline Windows 10 Office 2016
Novice
 
Join Date: Sep 2021
Posts: 11
lis is on a distinguished road
Default

Quote:
Originally Posted by Guessed View Post
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

That sounds like a good option with the macro. When I try to run the macro though, it leads to the run time error "Cannot access individual rows in this collection because the table has vertically merged cells."

I fear in the end I will just change the font size by hand to 11

But thank you both very much for your help.
Reply With Quote