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 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。