![]() |
|
#1
|
|||
|
|||
![]()
Created a new table style.
When I went to apply it, the new style didn't display in the gallery. Tried to create the style again. Word tells me that the style name is already in use. If it's already in use, how do I make it show up in the style gallery? |
#2
|
||||
|
||||
![]()
Words stylenames can be hidden from view quite easily so it is possible to have a style in the document which doesn't appear in the list because it is hidden. Normally, you go into Manage Styles to set the visibility but Table Styles can have this setting disabled for some reason that I don't understand.
Fortunately, vba comes to the rescue. This macro hides EVERY built-in table style (apart from one) and shows all the custom ones. I recommend you hide all of the built-in styles and then selectively show the few that you do want. Code:
Sub HideMostTableStyles() Dim sty As Style For Each sty In ActiveDocument.Styles If sty.Type = wdStyleTypeTable Then Debug.Print sty.NameLocal, sty.BuiltIn sty.Visibility = sty.BuiltIn 'only the custom names are visible End If Next sty ActiveDocument.Styles("Table Grid").Visibility = False 'in magical Microsoft-land Visibility=False means you can see it End Sub
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
![]() |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
Change Table Style from Table 5 Onwards. | mc1903 | Word VBA | 1 | 01-08-2021 08:36 AM |
![]() |
fly545 | Word VBA | 11 | 01-16-2020 05:53 PM |
![]() |
dylansmith | Excel | 4 | 04-03-2017 10:53 AM |
![]() |
ChrisFManchester | Word Tables | 2 | 07-05-2015 06:17 AM |
![]() |
dylansmith | Excel | 9 | 05-16-2014 07:25 PM |