Re: Styles, setting bullet gallery

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Word Heretic (myfullname_at_tpg.com.au)
Date: 05/18/04


Date: Tue, 18 May 2004 11:05:52 +1000

G'day John D <anonymous@discussions.microsoft.com>,

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:

>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 error
>Is there any value in giving the ListTemplate a Name and using that.
>
> X=1
> ActiveDocument.Styles(Name).LinkToListTemplate ListTemplate:=ListGalleries(wdBulletGallery). _
> ListTemplates(X), ListLevelNumber:=1
>
>John D