Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.docmanagement
Rao Rao is offline
external usenet poster
 
Posts: 7
Default Word 2007 Combining Bibliography from Multiple Documents

If a user created citations in certain sections of a document on his laptop.
If another user created additional citations in a different section on the
same document simultaneously on his own laptop. These 2 users have the same
document but do not share the document. How can can the third user take those
documents from 2 users and combine the citations?

Any help is appreciated.

Thanks,

RSR

  #2   Report Post  
Posted to microsoft.public.word.docmanagement
Yves Dhondt Yves Dhondt is offline
external usenet poster
 
Posts: 767
Default Word 2007 Combining Bibliography from Multiple Documents

The third user could merge them through 'Manage Sources'.

Open document 1, copy the citations from the current list to the master
source list.
Open document 2, copy the citations from the current list to the master
source list.
Open document 3, copy the content of the master list back to the current
list.

It might be a bit of a hassle as during the copying of the elements of the
second current list to the master list, you will have to press yes to
overwrite the common sources from the first current list as they will share
the same tag.

Alternatively, you could run a macro which does the combining for you.

========= Start of sample macro =========
Sub CombineSources()
Dim doc1 As Document ' Version by person 1
Dim doc2 As Document ' Version by person 2
Dim doc3 As Document ' Version by person 3

Dim idx As Integer
Dim src As Source
Dim tag As String
Dim idx2 As Integer
Dim contains As Boolean

Set doc1 = Application.Documents.Open("e:\MergeSources\doc1.d ocx")
Set doc2 = Application.Documents.Open("e:\MergeSources\doc2.d ocx")
Set doc3 = Application.Documents.Open("e:\MergeSources\doc3.d ocx")

' For each source in the original document, get the tag.
' If there is no source with such a tag in the final document
' yet, add the source.
For idx = 1 To doc1.Bibliography.Sources.Count
Set src = doc1.Bibliography.Sources(idx)
tag = src.field("Tag")

contains = False
For idx2 = 1 To doc3.Bibliography.Sources.Count
If doc3.Bibliography.Sources(idx2).field("Tag") = tag Then
contains = True
Exit For
End If
Next

If contains = False Then
doc3.Bibliography.Sources.Add (src.xml())
End If
Next

For idx = 1 To doc2.Bibliography.Sources.Count
Set src = doc2.Bibliography.Sources(idx)
tag = src.field("Tag")

contains = False
For idx2 = 1 To doc3.Bibliography.Sources.Count
If doc3.Bibliography.Sources(idx2).field("Tag") = tag Then
contains = True
Exit For
End If
Next

If contains = False Then
doc3.Bibliography.Sources.Add (src.xml())
End If
Next

doc1.Close
doc2.Close

End Sub
========== End of sample macro ==========

Remarks about the macro:
1)the names of the 3 files are hardcoded near the beginning;
2)all documents should be closed to start with;
2)the final document is not automatically closed.

Yves
--
BibWord : Microsoft Word Citation and Bibliography styles
http://bibword.codeplex.com


"Rao" wrote in message
...
If a user created citations in certain sections of a document on his
laptop.
If another user created additional citations in a different section on the
same document simultaneously on his own laptop. These 2 users have the
same
document but do not share the document. How can can the third user take
those
documents from 2 users and combine the citations?

Any help is appreciated.

Thanks,

RSR


  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Yves Dhondt Yves Dhondt is offline
external usenet poster
 
Posts: 767
Default Word 2007 Combining Bibliography from Multiple Documents


The third user could merge them through 'Manage Sources'.

Open document 1, copy the citations from the current list to the master
source list.
Open document 2, copy the citations from the current list to the master
source list.
Open document 3, copy the content of the master list back to the current
list.

It might be a bit of a hassle as during the copying of the elements of the
second current list to the master list, you will have to press yes to
overwrite the common sources from the first current list as they will share
the same tag.

Alternatively, you could run a macro which does the combining for you.

========= Start of sample macro =========
Sub CombineSources()
Dim doc1 As Document ' Version by person 1
Dim doc2 As Document ' Version by person 2
Dim doc3 As Document ' Version by person 3

Dim idx As Integer
Dim src As Source
Dim tag As String
Dim idx2 As Integer
Dim contains As Boolean

Set doc1 = Application.Documents.Open("e:\MergeSources\doc1.d ocx")
Set doc2 = Application.Documents.Open("e:\MergeSources\doc2.d ocx")
Set doc3 = Application.Documents.Open("e:\MergeSources\doc3.d ocx")

' For each source in the original document, get the tag.
' If there is no source with such a tag in the final document
' yet, add the source.
For idx = 1 To doc1.Bibliography.Sources.Count
Set src = doc1.Bibliography.Sources(idx)
tag = src.field("Tag")

contains = False
For idx2 = 1 To doc3.Bibliography.Sources.Count
If doc3.Bibliography.Sources(idx2).field("Tag") = tag Then
contains = True
Exit For
End If
Next

If contains = False Then
doc3.Bibliography.Sources.Add (src.xml())
End If
Next

For idx = 1 To doc2.Bibliography.Sources.Count
Set src = doc2.Bibliography.Sources(idx)
tag = src.field("Tag")

contains = False
For idx2 = 1 To doc3.Bibliography.Sources.Count
If doc3.Bibliography.Sources(idx2).field("Tag") = tag Then
contains = True
Exit For
End If
Next

If contains = False Then
doc3.Bibliography.Sources.Add (src.xml())
End If
Next

doc1.Close
doc2.Close

End Sub
========== End of sample macro ==========

Remarks about the macro:
1)the names of the 3 files are hardcoded near the beginning;
2)all documents should be closed to start with;
2)the final document is not automatically closed.

Yves
--
BibWord : Microsoft Word Citation and Bibliography styles
http://bibword.codeplex.com


"Rao" wrote in message
...
If a user created citations in certain sections of a document on his
laptop.
If another user created additional citations in a different section on the
same document simultaneously on his own laptop. These 2 users have the
same
document but do not share the document. How can can the third user take
those
documents from 2 users and combine the citations?

Any help is appreciated.

Thanks,

RSR


Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Combining multiple documents in Word 2007 (track changes) Beach Lover Microsoft Word Help 2 March 4th 10 10:51 PM
word 2007 hangs when combining documents J.F. Larente Microsoft Word Help 1 November 27th 07 10:59 AM
Combining multiple documents into one Glenn Chung Microsoft Word Help 2 July 28th 05 05:56 AM
Combining multiple merge documents cth5c Mailmerge 1 June 15th 05 11:14 AM
Combining multiple documents Glenn Chung Microsoft Word Help 2 March 14th 05 10:38 PM


All times are GMT +1. The time now is 02:19 AM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"