DocumentBase.Footnotes 屬性

取得 Footnotes 集合,表示文件中的所有註腳。

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

語法

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

屬性值

型別:Microsoft.Office.Interop.Word.Footnotes
Footnotes 集合,表示文件中的所有註腳。

範例

下列程式碼範例將文字加入至第一個段落,然後將註腳加入至第二個字。 若要使用這個範例,請在文件層級專案中的 ThisDocument 類別執行。

Private Sub DocumentFootnotes()
    Dim text As Object = "Sample footnote text."
    Me.Paragraphs(1).Range.InsertParagraphAfter()
    Me.Paragraphs(1).Range.Text = "This is sample paragraph text."
    Me.Footnotes.Location = Word.WdFootnoteLocation.wdBeneathText
    Me.Footnotes.NumberStyle = Word.WdNoteNumberStyle.wdNoteNumberStyleLowercaseRoman
    Me.Footnotes.Add(Me.Paragraphs(1).Range.Words(2).Characters(2), , text)
End Sub
private void DocumentFootnotes()
{
    object text = "Sample footnote text.";
    this.Paragraphs[1].Range.InsertParagraphAfter();
    this.Paragraphs[1].Range.Text = "This is sample paragraph text.";
    this.Footnotes.Location = Word.WdFootnoteLocation.wdBeneathText;
    this.Footnotes.NumberStyle = Word.WdNoteNumberStyle.wdNoteNumberStyleLowercaseRoman;
    this.Footnotes.Add(this.Paragraphs[1].Range.Words[2].Characters[2], ref missing, ref text);
}

.NET Framework 安全性

請參閱

參考

DocumentBase 類別

Microsoft.Office.Tools.Word 命名空間