Application![]() ![]() ![]() |
由 ListGallery 对象所组成的集合,该集合中的对象代表“项目符号和编号”对话框中的三个选项卡。
用 ListGalleries 属性可返回 ListGalleries 集合。下列示例列举列表库集合,以将其中七个列表模板(格式)恢复成 Word 内置列表模板格式。
For Each lg In ListGalleries
For x = 1 To 7
lg.Reset(x)
Next x
Next lg
用 ListGalleries (index) 可返回单独的 ListGallery 对象,其中 index 是 wdBulletGallery、wdNumberGallery 或 wdOutlineNumberGallery。
下列示例返回“项目符号和编号”对话框中“项目符号”选项卡上的第三种列表格式(不包括“无”),并将选定内容设置为该格式。
Set temp3 = ListGalleries(wdBulletGallery).ListTemplates(3)
Selection.Range.ListFormat.ApplyListTemplate ListTemplate:= temp3
用 ListGallery 对象的 Modified 属性,可查看指定列表模板是否保留了 Word 内置格式。用 ListGallery 对象的 Reset 方法,可重新设为原来的列表格式。