Styles, setting bullet gallery

J

John D

Hi All
I am trying to programatically set styles and I am having problems setting the ListTemplate(number) refer code below. My code is setting the values OK but this code is linking the style to ListTemplate (6) instead of ListTemplate (1
What am I doing wrong or what things should I be looking for to find the erro
Is there any value in giving the ListTemplate a Name and using that

X=
ActiveDocument.Styles(Name).LinkToListTemplate ListTemplate:=ListGalleries(wdBulletGallery).
ListTemplates(X), ListLevelNumber:=

John D
 
W

Word Heretic

G'day John D <[email protected]>,

I always link styles to LTs in the document itself.

I search the existing doc LT collection for one of the right name, if
its not found I create a new one with ActiveDocument.ListTemplates.Add
....

I then style up the LT as required, and finish up with:

ActiveDocument.ListTemplates(1).ListLevels(1).LinkedStyle = _
"The style name"



Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


John D reckoned:
 
J

John Davidson

Thanks Steve,
I finished up defining a complete OutlineNumberGallery.ListTemplate and
got a better job than I expected, all bullets and numbering is now
hierarchical.
I didn't know that you could set bullets and letters within an
OutlineNumberGallery.ListTemplate and I was trying to do them separately
in the Bullet Gallery and the Number Gallery and that was the main problem.
Your suggestion didn't directly help but it made me think about things
differently, thanks once again.

John D.
 
W

Word Heretic

G'day John Davidson <[email protected]>,

Well done! Its a tricky subject - nice to see someone master it :)

Steve Hudson - Word Heretic
Want a hyperlinked index? S/W R&D? See WordHeretic.com

steve from wordheretic.com (Email replies require payment)


John Davidson reckoned:
 

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