Поделиться через


DocumentBase.TablesOfAuthoritiesCategories - свойство

Возвращает коллекцию TablesOfAuthoritiesCategories, в которой хранятся доступные категории таблицы полномочий для документа.

Пространство имен:  Microsoft.Office.Tools.Word
Сборка:  Microsoft.Office.Tools.Word.v4.0.Utilities (в Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

Синтаксис

'Декларация
Public ReadOnly Property TablesOfAuthoritiesCategories As TablesOfAuthoritiesCategories
    Get
public TablesOfAuthoritiesCategories TablesOfAuthoritiesCategories { get; }

Значение свойства

Тип: Microsoft.Office.Interop.Word.TablesOfAuthoritiesCategories
Коллекция TablesOfAuthoritiesCategories, в которой хранятся доступные категории таблицы полномочий для документа.

Примеры

В приведенном ниже примере кода отображаются имена всех категорий таблиц полномочий. Чтобы использовать этот пример, запустите его из класса ThisDocument в проекте уровня документа.

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 
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());
}

Безопасность платформы .NET Framework

См. также

Ссылки

DocumentBase Класс

Microsoft.Office.Tools.Word - пространство имен