Class TableOfAuthorities (Word VBA)

The class TableOfAuthorities represents a single table of authorities in a document (a TOA field). The TableOfAuthorities object is a member of the TablesOfAuthorities collection. The TablesOfAuthorities collection includes all the tables of authorities in a document.

The main procedures of class TableOfAuthorities are Delete and TablesOfAuthorities.Add


To use a TableOfAuthorities class variable it first needs to be instantiated, for example

Dim toas as TableOfAuthorities
Set toas = ActiveDocument.TablesOfAuthorities(Index:=1)

The following procedures can be used to set variables of type TableOfAuthorities: TablesOfAuthorities.Add, TablesOfAuthorities.Item and Document.TablesOfAuthorities

For Each

Here is an example of processing the TableOfAuthorities items in a collection.

Dim toa As TableOfAuthorities 
For Each toa In ActiveDocument.TablesOfAuthorities 
 toa.IncludeCategoryHeader = True 
Next toa


Some procedures in this class have been grouped together in themes and are described on separate theme pages

Format with its procedures KeepEntryFormatting and TablesOfAuthorities.Format
Page with its procedures PageNumberSeparator and PageRangeSeparator


These are the main methods of the TableOfAuthorities class

Delete - Deletes the specified table of authorities.


TablesOfAuthorities.Add - Returns a TableOfAuthorities object that represents a table of authorities added to a document.

Dim toas As TableOfAuthorities
Set toas = ActiveDocument.TablesOfAuthorities.Add(Range:=)

Other Methods

TablesOfAuthorities.MarkAllCitations - Inserts a TA (Table of Authorities Entry) field after all instances of the ShortCitation text.

Dim strShortCitation As String: strShortCitation =  
ActiveDocument.TablesOfAuthorities.MarkAllCitations ShortCitation:=strShortCitation

TablesOfAuthorities.MarkCitation - Inserts a TA (Table of Authorities Entry) field and returns the field as a Field object.

Dim strShortCitation As String: strShortCitation =  
Dim fldMarkCitation As Field
Set fldMarkCitation = ActiveDocument.TablesOfAuthorities.MarkCitation(Range:=, ShortCitation:=strShortCitation)


Bookmark returns or sets the name of the bookmark from which to collect table of authorities entries.

ActiveDocument.TablesOfAuthorities(1).Bookmark =

Category returns or sets the category of entries to be included in a table of authorities.

ActiveDocument.TablesOfAuthorities(1).Category =

EntrySeparator returns or sets the characters (up to five) that separate a table of authorities entry and its page number.

ActiveDocument.TablesOfAuthorities(1).EntrySeparator =

IncludeCategoryHeader true if the category name for a group of entries appears in the table of authorities.

ActiveDocument.TablesOfAuthorities(1).IncludeCategoryHeader = True

IncludeSequenceName returns or sets the Sequence (SEQ) field identifier for a table of authorities.

ActiveDocument.TablesOfAuthorities(1).IncludeSequenceName =

Parent returns an object that represents the parent object of the specified TableOfAuthorities object.

Dim objParent As Object
Set objParent = ActiveDocument.TablesOfAuthorities(1).Parent

Passim true if five or more page references to the same authority are replaced with "Passim.

ActiveDocument.TablesOfAuthorities(1).Passim = True

Range returns a Range object that represents the portion of a document that is contained within a table of authorities.

Dim rngRange As Range
Set rngRange = ActiveDocument.TablesOfAuthorities(1).Range

Separator returns or sets up to five characters that appear between the sequence number and the page number in a table of authorities.

ActiveDocument.TablesOfAuthorities(1).Separator =

TabLeader returns or sets the leader character that appears between entries and their associated page numbers in a table of authorities.

ActiveDocument.TablesOfAuthorities(1).TabLeader = wdTabLeaderDashes

TablesOfAuthorities.Count returns a Long that represents the number of tables of authorities in the collection.

Dim lngCount As Long
lngCount = ActiveDocument.TablesOfAuthorities.Count

TablesOfAuthorities.Parent returns an object that represents the parent object of the specified TablesOfAuthorities object.

Dim objParent As Object
Set objParent = ActiveDocument.TablesOfAuthorities.Parent