TablesOfAuthorities Collection Object

Microsoft Word Visual Basic

TablesOfAuthorities Collection Object

Document TablesOfAuthorities
TableOfAuthorities
Range

A collection of TableOfAuthorities objects (TOA fields) that represents the tables of authorities in a document.

Using the TablesOfAuthorities Collection

Use the TablesOfAuthorities property to return the TablesOfAuthorities collection. The following example applies the Classic built-in format to all the tables of authorities in the active document.

ActiveDocument.TablesOfAuthorities.Format = wdTOAClassic
		

Use the Add method to add a table of authorities to a document. A table of authorities is built from TA (Table of Authorities Entry) fields in a document. The following example adds a table of authorities that includes all categories at the beginning of the active document.

Set myRange = ActiveDocument.Range(Start:=0, End:=0)
ActiveDocument.TablesOfAuthorities.Add Range:=myRange, _
    Passim:=True, Category:=0, EntrySeparator:= ", "
		

Use TablesOfAuthorities(index), where index is the index number, to return a single TableOfAuthorities object. The index number represents the position of the table of authorities in the document. The following example includes category headers in the first table of authorities in the active document and then updates the table.

With ActiveDocument.TablesOfAuthorities(1)
    .IncludeCategoryHeader = True
    .Update
End With