Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-05-2021, 03:02 AM
lis lis is offline Text does not appear in defined style (font size) Windows 10 Text does not appear in defined style (font size) Office 2016
Novice
Text does not appear in defined style (font size)
 
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
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Text does not appear in defined style (font size) Balloon Text font and size macro Artimae Word VBA 5 11-16-2017 05:20 PM
When changing table style in Word 2010, font size seems to change but doesn't show in new tables heartsoulliving Word 1 12-07-2016 05:17 PM
Text does not appear in defined style (font size) Font size of track changes balloon text Oryctolagus Word 1 11-13-2013 09:27 AM
Quick Style Arial font size 11 is 12 Hornet Word 1 05-17-2013 12:09 PM
Text does not appear in defined style (font size) Change font style and size in multiple documents fitkhan Word 1 04-27-2011 09:49 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:24 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft