次の方法で共有


DocumentBase.Endnotes プロパティ

文書内のすべての文末脚注を表す Endnotes コレクションを取得します。

名前空間:  Microsoft.Office.Tools.Word
アセンブリ:  Microsoft.Office.Tools.Word.v4.0.Utilities (Microsoft.Office.Tools.Word.v4.0.Utilities.dll 内)

構文

'宣言
Public ReadOnly Property Endnotes As Endnotes
    Get
public Endnotes Endnotes { get; }

プロパティ値

型: Microsoft.Office.Interop.Word.Endnotes
文書内のすべての文末脚注を表す Endnotes コレクション。

最初の段落にテキストを追加し、2 つめの単語に文末脚注を追加するコード例を次に示します。 この例を使用するには、これをドキュメント レベルのプロジェクトの ThisDocument クラスから実行します。

Private Sub DocumentEndnotes()
    Dim text As Object = "Sample endnote text."
    Me.Paragraphs(1).Range.InsertParagraphAfter()
    Me.Paragraphs(1).Range.Text = "This is sample paragraph text."
    Me.Endnotes.Location = Word.WdEndnoteLocation.wdEndOfDocument
    Me.Endnotes.NumberStyle = Word.WdNoteNumberStyle.wdNoteNumberStyleLowercaseRoman
    Me.Endnotes.Add(Me.Paragraphs(1).Range.Words(2).Characters(2), , text)
End Sub 
private void DocumentEndnotes()
{
    object text = "Sample endnote text.";
    this.Paragraphs[1].Range.InsertParagraphAfter();
    this.Paragraphs[1].Range.Text = "This is sample paragraph text.";
    this.Endnotes.Location = Word.WdEndnoteLocation.wdEndOfDocument;
    this.Endnotes.NumberStyle = Word.WdNoteNumberStyle.wdNoteNumberStyleLowercaseRoman;
    this.Endnotes.Add(this.Paragraphs[1].Range.Words[2].Characters[2], ref missing, ref text);

}

.NET Framework セキュリティ

  • 直前の呼び出し元に対する完全な信頼。 このメンバーは、部分的に信頼されているコードから使用することはできません。 詳細については、「部分信頼コードからのライブラリの使用」を参照してください。

参照

参照

DocumentBase クラス

Microsoft.Office.Tools.Word 名前空間