This feature of Word must be hopelessly complex (so much so that it is over my head), or flat out broken in the UI.
Today I created a new template and in that template, I created nine new styles "Legal List L1 trough Legal List L9." I then linked those new styles to a new List Style which I named "Legal List."
After creating the new styles, all nine styles appear in the Styles Pane. My style pane options are:
Select Styles to Show: In current document
Select how list is sorted: Alphabetical.
With the template open and blank (containing no text). All of these 9 styles appear in the Styles pain regardless if the select Styles to show is set to "In current document" (which I concede they may be), or "In Use" which they certainly are not.
The same behavior occurs if I open a new blank document based on this template.
Next using the Manage Styles dialog Recommend Tab, I set styles Legal List L4-L9 to "Hide until used." Again, no combination of settings in the various Manage Style dialog tabs resulted in L4-L9 being hidden in the styles pane until used.
Finally I ran this macro which does at least hide the L4-L9 styles until they are used. However if say L4 is applied to a paragraph and then that paragraph is deleted L4 remains visible and I can only hide it again by rerunning the macro:
Sub ScratchMacro()
'A basic Word macro coded by Greg Maxey
Dim oStyle As Style
Dim oPar As Paragraph
Dim bNotUsed As Boolean
bNotUsed = True
For Each oStyle In ActiveDocument.Styles
If InStr(oStyle.NameLocal, "Legal List L") = 1 Then
If Right(oStyle.NameLocal, 1) > 3 Then
For Each oPar In ActiveDocument.Paragraphs
If oPar.Style = oStyle Then
bNotUsed = False
Exit For
End If
Next
If bNotUsed Then
oStyle.Visibility = True
oStyle.UnhideWhenUsed = True
End If
End If
End If
Next
End Sub
Is it supposed to be this hard? Is there nothing in the Manage Style UI dialogs that can be used to "hide" a style until it is actually used and if it is no longer being used then hide it again?
Thanks.