DocumentBase.TablesOfFigures 属性

定义

获取一个 TablesOfFigures 集合,该集合表示文档中图形的表。

public Microsoft.Office.Interop.Word.TablesOfFigures TablesOfFigures { get; }

属性值

TablesOfFigures

一个 TablesOfFigures 集合,表示文档中图形的表。

示例

下面的代码示例在活动文档中的插入点处添加图形表。 此示例假定文档包含一个或多个图形标题。 若要使用此示例,请在 ThisDocument 文档级项目的类中运行它。

private void DocumentTablesOfFigures()
{
    object Caption = Word.WdCaptionLabelID.wdCaptionFigure;
    this.TablesOfFigures.Add(this.Application.Selection.Range,
        ref Caption, ref missing, ref missing, ref missing,
        ref missing, ref missing, ref missing, ref missing,
        ref missing, ref missing, ref missing, ref missing);
}
Private Sub DocumentTablesOfFigures()
    Dim Caption As Object = Word.WdCaptionLabelID.wdCaptionFigure
    Me.TablesOfFigures.Add(Me.Application.Selection.Range, Caption)
End Sub 

适用于