DocumentBase.TablesOfFigures 屬性

取得 TablesOfFigures 集合,表示在文件中的圖形表格。

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

語法

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

屬性值

型別:Microsoft.Office.Interop.Word.TablesOfFigures
TablesOfFigures 集合,表示在文件中的圖形表格。

範例

下列程式碼範例會在現用文件的插入點加入圖形表格。 此範例會假設文件具有一個或多個圖形標題。 若要使用這個範例,請在文件層級專案中的 ThisDocument 類別執行。

Private Sub DocumentTablesOfFigures()
    Dim Caption As Object = Word.WdCaptionLabelID.wdCaptionFigure
    Me.TablesOfFigures.Add(Me.Application.Selection.Range, Caption)
End Sub 
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);
}

.NET Framework 安全性

請參閱

參考

DocumentBase 類別

Microsoft.Office.Tools.Word 命名空間