共用方式為


DocumentBase.TablesOfFigures Property

Definition

Gets a TablesOfFigures collection that represents the tables of figures in the document.

public:
 property Microsoft::Office::Interop::Word::TablesOfFigures ^ TablesOfFigures { Microsoft::Office::Interop::Word::TablesOfFigures ^ get(); };
public Microsoft.Office.Interop.Word.TablesOfFigures TablesOfFigures { get; }
member this.TablesOfFigures : Microsoft.Office.Interop.Word.TablesOfFigures
Public ReadOnly Property TablesOfFigures As TablesOfFigures

Property Value

A TablesOfFigures collection that represents the tables of figures in the document.

Examples

The following code example adds a table of figures at the insertion point in the active document. This example assumes that the document has one or more figure captions. To use this example, run it from the ThisDocument class in a document-level project.

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 

Applies to