次の方法で共有


DocumentBase.Bibliography プロパティ

文書に含まれている参考文献の参照を取得します。

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

構文

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

プロパティ値

型: Microsoft.Office.Interop.Word.Bibliography
文書に含まれている参考文献の参照を表す Bibliography

ソースの現在のリストとマスター リストにソースを追加するコード例を次に示します。 この例では、文書の末尾に新しい段落を追加し、この段落 (文書の最後の段落) に文献目録を挿入します。 この例を使用するには、これをドキュメント レベルのプロジェクトの ThisDocument クラスから実行します。

Private Sub AddBibliography()
    Dim guid As String = System.Guid.NewGuid().ToString()
    Dim src As String = _
        "<b:Source><b:Tag>Jam08</b:Tag><b:SourceType>Book</b:SourceType>" _
        + "<b:Guid>" + guid + "</b:Guid><b:LCID>0</b:LCID><b:Author>" _
        + "<b:Author><b:NameList><b:Person><b:Last>Persse</b:Last>" _
        + "<b:First>James</b:First></b:Person></b:NameList></b:Author>" _
        + "</b:Author><b:Title>Hollywood Secrets of Project Management " _
        + "Success</b:Title><b:Year>2008</b:Year><b:City>Redmond</b:City>" _
        + "<b:Publisher>Microsoft Press</b:Publisher></b:Source>"
    Me.Bibliography.Sources.Add(src)

    Me.Bibliography.BibliographyStyle = "APA"
    Me.Paragraphs.Last.Range.InsertParagraphAfter()
    Me.Fields.Add(Me.Paragraphs.Last.Range, _
        Word.WdFieldType.wdFieldBibliography)
End Sub
private void AddBibliography()
{
    string guid = System.Guid.NewGuid().ToString();
    string src = 
        "<b:Source><b:Tag>Jam08</b:Tag><b:SourceType>Book</b:SourceType>" 
        + "<b:Guid>" + guid + "</b:Guid><b:LCID>0</b:LCID><b:Author>" 
        + "<b:Author><b:NameList><b:Person><b:Last>Persse</b:Last>" 
        + "<b:First>James</b:First></b:Person></b:NameList></b:Author>" 
        + "</b:Author><b:Title>Hollywood Secrets of Project Management "
        + "Success</b:Title><b:Year>2008</b:Year><b:City>Redmond</b:City>"
        + "<b:Publisher>Microsoft Press</b:Publisher></b:Source>";
    this.Bibliography.Sources.Add(src);

    this.Bibliography.BibliographyStyle = "APA";
    this.Paragraphs.Last.Range.InsertParagraphAfter();
    object fieldType = Word.WdFieldType.wdFieldBibliography;
    this.Fields.Add(
        this.Paragraphs.Last.Range, 
        ref fieldType, 
        ref missing, 
        ref missing);
}

.NET Framework セキュリティ

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

参照

参照

DocumentBase クラス

Microsoft.Office.Tools.Word 名前空間

その他の技術情報

参考文献の使用