Proprietà Document.Bibliography (System 2007)

Aggiornamento: novembre 2007

Ottiene i riferimenti bibliografici contenuti all'interno del documento.

Spazio dei nomi:  Microsoft.Office.Tools.Word
Assembly:  Microsoft.Office.Tools.Word.v9.0 (in Microsoft.Office.Tools.Word.v9.0.dll)

Sintassi

<BrowsableAttribute(False)> _
Public ReadOnly Property Bibliography As Bibliography

Dim instance As Document
Dim value As Bibliography

value = instance.Bibliography
[BrowsableAttribute(false)]
public Bibliography Bibliography { get; }

Valore proprietà

Tipo: Microsoft.Office.Interop.Word.Bibliography

Oggetto Bibliography che rappresenta i riferimenti bibliografici contenuti all'interno del documento.

Esempi

Nell'esempio di codice riportato di seguito viene aggiunta un'origine all'elenco corrente e all'elenco principale delle origini. Viene quindi aggiunto un nuovo paragrafo alla fine del documento e viene inserita la bibliografia in questo paragrafo che è l'ultimo paragrafo nel documento.

Questo esempio è per una personalizzazione a livello di documento.

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);
}

Autorizzazioni

Vedere anche

Riferimenti

Document Classe

Membri Document

Spazio dei nomi Microsoft.Office.Tools.Word

Altre risorse

Utilizzo di bibliografie