Documents (Document)![]() |
代表引文目录类别(如“事例”和“法规”)的 TableOfAuthoritiesCategory 对象的集合。TablesOfAuthoritiesCategories 集合包括“引文目录”选项卡(位于“插入”菜单的“索引和目录”对话框中)的“类别”框中所有的 16 个类别。
可使用 TablesOfAuthoritiesCategories 属性返回 TablesOfAuthoritiesCategories 集合。下例将显示 TablesOfAuthoritiesCategories 集合中的类别名称。
For Each aCat In ActiveDocument.TablesOfAuthoritiesCategories
response = MsgBox(Prompt:=aCat, Buttons:=vbOKCancel)
If response = vbCancel Then Exit For
Next aCat
Add 方法不适用于 TablesOfAuthoritiesCategories 集合。集合中最多只能包括 16 个类别,但是可以用 Name 属性为一个现有的类别重新命名。
用 TablesOfAuthoritiesCategories(index) 可返回一个 TableOfAuthoritiesCategory 对象(其中 index 为类别名称或索引编号)。下例将类别“Rules”重新命名为“Other Provisions”。
ActiveDocument.TablesOfAuthoritiesCategories("Rules").Name = _
"Other Provisions"
索引编号代表“插入”菜单的“索引和目录”对话框中类别的位置。下例用于显示 TablesOfAuthoritiesCategories 集合中第一个类别的名称。
MsgBox ActiveDocument.TablesOfAuthoritiesCategories(1).Name