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
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 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关更多信息,请参见通过部分受信任的代码使用库。