DocumentBase.Bibliography Property


Gets the bibliography references contained within the document.

Namespace:   Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v4.0.Utilities (in Microsoft.Office.Tools.Word.v4.0.Utilities.dll)

public Bibliography Bibliography { get; }

Property Value

Type: Microsoft.Office.Interop.Word.Bibliography

A Bibliography that represents the bibliography references contained within the document.

The following code example adds a source to the current list and the master list of sources. The example then adds a new paragraph at the end of the document and inserts the bibliography in this paragraph, which is the last paragraph in the document. To use this example, run it from the ThisDocument class in a document-level project.

private void AddBibliography()
    string guid = System.Guid.NewGuid().ToString();
    string src = 
        + "<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.BibliographyStyle = "APA";
    object fieldType = Word.WdFieldType.wdFieldBibliography;
        ref fieldType, 
        ref missing, 
        ref missing);
Return to top