Reply
 
Thread Tools Display Modes
  #1   Report Post  
Dave Gaines Dave Gaines is offline
Junior Member
 
Posts: 0
Default Macro to Merge/Combine Multiple Revised Documents, Saving All Revisions and Comments

Hi all,

My issue is that I have written a macro to combine Tracked Changes and Comments from multiple reviewers into a single document. The code appears to work on its face, and I end up with a single document with numerous Tracked Changes and Comments, all associated with different Reviewer names.

Upon further examination, however, I find two issues with the merging of Revisions:

1. Sometimes, my current user name (David Gaines) is associated with a number of Revisions, even though I did not manually edit the source document. I suspect this is somehow caused by a glitch in my code or in Microsoft Word, wherein it is associating the current user (me) with some of the Revisions. Any insight into how to avoid this would be much appreciated.

2. Some of the Revisions are not being captured correctly in the final combined document. Specifically, a Revision shows alongside the original text instead of replacing it. Here's an example:

Original: The dog ran outside.
Revised: The cat ran outside.
Merged Result The dogcat ran outside.

When I combine the documents manually, I can get it to work correctly by changing the order in which I Combine documents, but can't figure out the "correct" order. Am thinking maybe the "Date Modified" file attribute determines which is the "original file?" In any case, thought I'd reach out for some "professional" help. My current code is provided below.

strInitialFileName = Dir$(strFolder & "*.do*")
strChangedFileName = Dir$()
If strChangedFileName "" Then
* * Do Until strChangedFileName = ""
* * * * Application.MergeDocuments OriginalDocument:=Documents.Open(FileName:=strFold er & strInitialFileName, Visible:=False), _
* * * * * * RevisedDocument:=Documents.Open(FileName:=strFolde r & strChangedFileName, Visible:=False), _
* * * * * * Destination:=wdCompareDestinationOriginal, Granularity:=wdGranularityCharLevel, _
* * * * * * CompareFormatting:=False, CompareCaseChanges:=True, CompareWhitespace:= _
* * * * * * True, CompareTables:=True, CompareHeaders:=True, CompareFootnotes:=True, _
* * * * * * CompareTextboxes:=True, CompareFields:=True, CompareComments:=True, _
* * * * * * CompareMoves:=True, FormatFrom:=wdMergeFormatFromOriginal
* * * * Documents(strChangedFileName).Close (wdDoNotSaveChanges)
* * * * Documents(strInitialFileName).Save
* * * * strChangedFileName = Dir$()
* * Loop
Else
* * Documents.Open strFolder & strInitialFileName, ReadOnly:=True
End If
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
Word 2007 combine revisions in one document djb Microsoft Word Help 0 April 6th 10 07:15 PM
Word 2007 combine revisions in one document djb Microsoft Word Help 0 April 6th 10 07:15 PM
Combine multiple Word documents ncoles Microsoft Word Help 1 March 10th 09 04:27 PM
is there a simpleway i can combine multiple word documents office timjimb Microsoft Word Help 1 December 2nd 06 01:38 PM
I need to combine multiple documents into one Shellv Microsoft Word Help 4 February 16th 06 02:04 AM


All times are GMT +1. The time now is 09:21 PM.

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"