Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.word.docmanagement
|
|||
|
|||
![]() 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 | |
|
|
![]() |
||||
Thread | Forum | |||
Combining multiple documents in Word 2007 (track changes) | Microsoft Word Help | |||
word 2007 hangs when combining documents | Microsoft Word Help | |||
Combining multiple documents into one | Microsoft Word Help | |||
Combining multiple merge documents | Mailmerge | |||
Combining multiple documents | Microsoft Word Help |