Udostępnij za pośrednictwem


DocumentBase.TablesOfAuthoritiesCategories Property

Definition

Gets a TablesOfAuthoritiesCategories collection that represents the available table of authorities categories for the document.

public:
 property Microsoft::Office::Interop::Word::TablesOfAuthoritiesCategories ^ TablesOfAuthoritiesCategories { Microsoft::Office::Interop::Word::TablesOfAuthoritiesCategories ^ get(); };
public Microsoft.Office.Interop.Word.TablesOfAuthoritiesCategories TablesOfAuthoritiesCategories { get; }
member this.TablesOfAuthoritiesCategories : Microsoft.Office.Interop.Word.TablesOfAuthoritiesCategories
Public ReadOnly Property TablesOfAuthoritiesCategories As TablesOfAuthoritiesCategories

Property Value

A TablesOfAuthoritiesCategories collection that represents the available table of authorities categories for the document.

Examples

The following code example displays the names of all of the tables of authorities categories. To use this example, run it from the ThisDocument class in a document-level project.

private void DocumentTablesOfAuthoritiesCategories()
{
    System.Text.StringBuilder stringBuilder1 =
        new System.Text.StringBuilder();

    foreach (Word.TableOfAuthoritiesCategory category in
        this.TablesOfAuthoritiesCategories)
    {
        stringBuilder1.Append(category.Name + ", ");
    }

    stringBuilder1.Remove(stringBuilder1.Length - 2, 2);
    stringBuilder1.Append(".");

    MessageBox.Show("The names of the table of " +
        "authorities categories are: " +
        stringBuilder1.ToString());
}
Private Sub DocumentTablesOfAuthoritiesCategories()
    Dim stringBuilder1 As New System.Text.StringBuilder()

    Dim category As Word.TableOfAuthoritiesCategory
    For Each category In Me.TablesOfAuthoritiesCategories
        stringBuilder1.Append(category.Name & ", ")
    Next category

    stringBuilder1.Remove(stringBuilder1.Length - 2, 2)
    stringBuilder1.Append(".")

    MessageBox.Show("The names of the table of authorities categories are: " _
        & stringBuilder1.ToString())
End Sub 

Applies to