ListTemplate Object
A list template object represents a list template and specifies all the formatting for a specific bullet format.
There are three collections that have a ListTemplates collection
(1) Document
(2) Template
(3) ListGallery
An easy way to apply list formatting is to use the ApplyBulletDefault, ApplyNumberDefault, and ApplyOutlineNumberDefault methods, which correspond, respectively, to the first list format (excluding None) on each tab in the Bullets and Numbering dialog box.
To apply a format other than the default format, use the ApplyListTemplate method, which allows you to specify the list format (list template) you want to apply.
ListTemplates Collection
Every document (or template) has a ListTemplates collection.
This collection represents all the list formats contained in that document.
ActiveDocument.ListTemplates
Sub Create_ListTemplate()
Dim oLTemplate As ListTemplate
Set oLTemplate = ActiveDocument.ListTemplates.Add(False, "MyListTemplate")
oLTemplate.ListLevels(1)
Set oLTemplate = ActiveDocument.ListTemplates.Add(True, "MyListTemplate")
oLTemplate.ListLevels(1)
oLTemplate.ListLevels(2)
oLTemplate.ListLevels(3)
End Sub
© 2024 Better Solutions Limited. All Rights Reserved. © 2024 Better Solutions Limited TopPrevNext