共用方式為


DocumentBase.TablesOfAuthorities 屬性

取得 TablesOfAuthorities 集合,表示在文件中的授權表格。

命名空間:  Microsoft.Office.Tools.Word
組件:  Microsoft.Office.Tools.Word.v4.0.Utilities (在 Microsoft.Office.Tools.Word.v4.0.Utilities.dll 中)

語法

'宣告
Public ReadOnly Property TablesOfAuthorities As TablesOfAuthorities
    Get
public TablesOfAuthorities TablesOfAuthorities { get; }

屬性值

型別:Microsoft.Office.Interop.Word.TablesOfAuthorities
TablesOfAuthorities 集合,表示在文件中的授權表格。

範例

下列程式碼範例會加入授權表格,此表格會在文件開頭編譯所有分類的參考。 若要使用這個範例,請在文件層級專案中的 ThisDocument 類別執行。

Private Sub DocumentTablesOfAuthorities()
    Me.Paragraphs(1).Range.InsertParagraphAfter()
    Dim StartPosition As Object = 0
    Dim EndPosition As Object = 0
    Dim range1 As Word.Range = Me.Range(StartPosition, EndPosition)

    Dim Passim As Object = True
    Dim Category As Object = 0
    Dim EntrySeparator As Object = ", "
    Me.TablesOfAuthorities.Add(range1, Category, , Passim, , EntrySeparator)

End Sub 
private void DocumentTablesOfAuthorities()
{
    this.Paragraphs[1].Range.InsertParagraphAfter();
    object Start = 0;
    object End = 0;
    Word.Range range1 = this.Range(ref Start, ref End);

    object Passim = true;
    object Category = 0;
    object EntrySeparator = ", ";
    this.TablesOfAuthorities.Add(range1, ref Category, ref missing,
        ref Passim, ref missing, ref EntrySeparator, ref missing,
        ref missing, ref missing, ref missing, ref missing);
}

.NET Framework 安全性

請參閱

參考

DocumentBase 類別

Microsoft.Office.Tools.Word 命名空間