View Single Post
 
Old 05-08-2012, 03:25 PM
macropod's Avatar
macropod macropod is offline Windows 7 64bit Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,372
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Hi Paul,

AFAIK, Sources.xml is the only file used for the 'master' list. However, every cited reference in your dissertation should still be in that. You can add those back to the 'master' list from a given document's list via a macro like:
Code:
Sub SourcesRebuild()
Dim oSrc As Source
'Don't throw an error if the source is already present
On Error Resume Next
For Each oSrc In ActiveDocument.Bibliography.Sources
  Application.Bibliography.Sources.Add oSrc.XML
Next
End Sub
For backup/restore purposes, you can also export the 'master' list to a new document from which it can later be restored, using macros like:
Code:
Sub SourcesExport()
Dim oSrc As Source, StrSrc As String
With ActiveDocument
  .Range.Text = vbNullString
  For Each oSrc In Application.Bibliography.Sources
    StrSrc = StrSrc & vbCr & oSrc.XML
  Next
  .Range.InsertAfter StrSrc
  .Paragraphs.First.Range.Delete
End With
End Sub
 
Sub SourcesImport()
Dim i As Long, StrSrc As String
'Don't throw an error if the source is already present
On Error Resume Next
With ActiveDocument
  For i = 0 To UBound(Split(.Range.Text, vbCr))
    Application.Bibliography.Sources.Add Split(.Range.Text, vbCr)(i)
  Next
End With
End Sub
Writing the list to a document, instead of adding them to its bibliography or simply backing up Sources.xml, makes it easier to delete entries that are no longer needed before reimporting the list.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote