Outline numbering - list galleries

D

Denise

Does anyone know how to retrieve what ListGalleries
ListTemplate number on which the cursor is currently
residing?

What I'm trying to accomplish is that when I
programmically insert a new outline numbering style into a
document that already has other styles (non-heading), the
jason tabs appear. All I need to do by hand is access
bullets and numbering and press OK. However, there is no
way to do this through code without accessing which
ListTemplate is necessary.

Thanks.

Denise
 
B

Bruce Brown

Denise -

VBA doesn't need to know what ListTemplate your cursor is on, and the
cursor doesn't have to be on an outline-numbered style.

This code loops through all the outline-numbered list templates,
testing each of nine levels to determine whether there's an
outline-numbered style linked to that level; if so, it clears the
style's tab stops.

Sub GoodbyeJason()
Dim StyleNm As String, L As ListTemplate, k As Byte
For Each L In ActiveDocument.ListTemplates
If L.OutlineNumbered = True Then
For k = 1 To 9
If L.ListLevels(k).LinkedStyle <> "" Then
StyleNm = L.ListLevels(k).LinkedStyle
ActiveDocument.Styles(StyleNm).ParagraphFormat.TabStops.ClearAll
End If
Next
End If
Next
End Sub

No guarantee that the Jason tabs won't come back, but you can always
clear them with the code above. - Bruce

=========================================================================
 
D

Denise

Thanks, Bruce. I figured out the code I needed, but I
will definitely take a look at your code.

Denise
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top