ListTemplate index - how to get?

C

Chuck

Hi all

I'm trying to figure out how to get the ListTemplate index/name for a
specific style -- I'd like to be able to modify the style's LinkedStyle and
in order to do that it seems I have to specify the Style's ListTemplate first.

Just to test if I can identify it, I tried the following code

Set mystyle = ActiveDocument.Styles("Level 1")

MsgBox ActiveDocument.ListTemplates(mystyle.ListTemplate.Name). _
ListLevels(1).LinkedStyle

I don't get an error but the result of "mystyle.ListTemplate.Name" is "" (ie
nothing).

Any pointers? Thanks in advance!

Chuck
 
C

Chad DeMeyer

Chuck,

ListTemplates are not given a name automatically, only when you specifically
set one using VBA. However, why not just return a reference to the list
template like this:

Set oLT = ActiveDocument.Styles("Level 1").ListTemplate
sLkStyl = oLT.ListLevels(1).LinkedStyle
MsgBox sLkStyl

Regards,
Chad
 

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