Comparing Two Versions of a Word Document
Has this ever happened to you? You prepare a document in Microsoft Word and send it out for review, but when you get back the reviewed copies you find that one of the reviewers made changes without change-tracking turned on. So, how do you find out what changes were made? It turns out, there’s three ways to tackle this. (Another scenario is that you, yourself, create multiple versions of the same document over time, but then forget which is which. I can’t tell you how many times I’ve done that.)
The first method is to use Microsoft Word itself. It has a feature that allows you to compare two versions of the same document, and merge them into a third version. Whatever differences it finds between the first two become tracked changes in the third. At that point, you can review the changes to accept or reject them, just as if the reviewer had turned on track changes in the first place. Now, I must admit that I don’t personally use this feature very often. But, as I recall, it can be tricky to make sure that Word compares the files in the correct order. If you get it backwards, then additions show up as deletions and vice versa. (Note: My experience is based on Office 2000. The process may have improved since then.) In Office 2000, the instructions for doing this are under the heading of “Compare two copies of a document”. Paste that phrase into the “What would you like to do?” box in the help system, and it should come right up.
The second method is to use an external compare tool, such as WinMerge. (See our previous tips about downloading, installing and using WinMerge). WinMerge, like most third-party compare tools, can only work with ASCII files. So, before comparing to Word documents they both have to be converted to ASCII:
- Open the first Word document (in Word).
- Select File | Save-As (F12).
- Change the Save as Type to “Text Only with Line Breaks (*.txt)”

- Make sure that the filename is now different from the original. (This usually happens automatically, changing the extension from .doc to .txt)
- Click OK
- When Word warns you that you’ll be losing the formatting, click OK.
- Repeat the above with a second file.
- Now that you have ASCII text or versions of the two were documents, you can compare those with WinMerge, or another compare tool.
Yeah, yeah, I know! I hear the cynics in the audience groaning. But, bear with me for a minute.
What I just described is actually more work than the first method. Also, this method only works if all you are interested in finding are the differences in content, since the formatting will be completely lost, which is another downside. I readily admit that none of the methods described here are better than having change tracking turned on in the first place.
One situation where this second method turns out to be superior to the first is when a document is sent out to many different reviewers, each of whom only make a small number of changes. By converting each of the revised documents to ASCII, it becomes trivial to compare them against each other, mixing and matching. For example if two of the reviewers make virtually the same change, you could compare those two versions directly against each other in order to determine which version you like better. The downside is that accepting changes is no longer a matter of just clicking the Accept button in change-track-review-mode. You’ll have to copy and paste the changes back into the original Word document yourself. But again, in the case of there only being a handful of small changes scattered around, that may not be a big deal.
Tip #1: In the scenario described above, where there are multiple review copies to be assimilated, you could take advantage of WinMerge’s ability to quickly copy differences from one ASCII file to another. In that way, you’d create one “master” ASCII file that combines all of the changes from all the review copies. Having all the changes together in one place in one ASCII file might make it easier to then copy and paste the changes back into the Word document.
I promised you a third method. What if, in the second method, we could reduce the first six steps to a single step? Well, this is easily done if you have CygWin installed on your machine. (See our previous tips about installing and running CygWin.) CygWin comes with a variation of the UNIX CAT command, called CATDOC. (Cat is short for concatenate.) The regular CAT command takes the contents of one file and sends it to another, or sends it to the console, or whatever. (Invoking it consecutively 2 or more times is what makes the concatenation happen.) So, as you might imagine, CATDOC does the same thing, the difference being that whenever it sees that a source file is a Microsoft Word document, it automatically filters out all of the formatting, so that only plain ASCII is sent to the output.
catdoc review1.doc > review1.txt catdoc -xw review1.doc > review1.txt
CATDOC has a number of optional commandline switches. The -w switch is the most interesting. That one determines whether or not paragraphs are broken into separate lines (i.e. word wrapped). The default is to wrap. Adding -w makes them unwrapped (each paragraph is one long line). In other words, specifying -w is the equivalent of using Save-As in Word with a file type of “Text Only”, and leaving out the -w is the equivalent of using Save-As in Word with a file type of “Text Only with Line Breaks”.
The -x switch tells CATDOC that whenever it encounters an unknown character it should render it using “\xNNN” notation. Otherwise, it will replace the unknown character with just a question mark (?).
Tip #2: The output from CATDOC (no -w) and the output from doing a Save-As in Word using “Text Only with Line Breaks” are close, but not identical. For one thing, they break at different line lengths. For another, Word will render paragraph numbers and bullets, while CATDOC does not. So, if you will be mixing and matching, then it would be better to be sure to specify -w when using CATDOC, and to specify “Text Only” when using Word Save-As, so, at least, the word-wrapping won’t be an issue.
Tip #3: Actually, this is just the “coming attractions” for another tip article. There is a way to automatically invoke CATDOC against all of the Word files in a given folder — to convert them all in one fell swoop — but that’ll be the subject of an entirely different article. So, be sure to set your aggregator to point to the CodeJacked RSS feed (http://www.codejacked.com/feed/), and keep your eyes peeled.
Read more: Uncategorized, Windows
Trackbacks & Pings
Comments
-
Sweet tip! I’ve used compare in Word and WinMerge has saved the day numerous times, but I’ve never gotten into CygWin despite reading about it many times.
WinMerge is invaluable for tracking down small differences in any kind of document. HTML files, registry files, logs, etc.
-
Beyond Compare is what I use (with plain text) and it does a wonderful job.
-
i think it can be done with vim ..in windows also
-
You could also try using Workshare’s DeltaView product or DeltaView PE.
http://www.workshare.com/products/wsdeltaview/workshare_deltaview_pe.aspx. There’s a trial version available for download. -
I use a difference tool for textfiles, but I really don’t see a lot of use for word documents, where half of what I’m checking in the tracked changes is formatting changes.
It’s really easy to remember how to use the compare documents feature in MS Word, and it seems a little condescending to write it off so quickly in method #1 above.
1) Open the original document
2) Do the “compare documents” and choose the one that has been changed.
3) The resulting document shows the changes FROM the original TO the changed copy. Save this off as XX.trackchanges.doc and you’ll still have both your original and the one that was edited by someone else. Then review and accept/reject changes as you need. -
You forgot the fourth option:
1. Print out both documents
2. Arrange the printed pages so that page 1 from doc 1 is on top of page 1 from doc 2, etc.
3. Hold the paid of pages up to the window
4. Look for differences.Hey, this was the only option in the old days
-
Hi,
I have a word doc that has been sent as an attachment, a figure in the doc has been changed. How do I delayer the document to reveal the original figure.Thanks guys
-
I need clarification. What do you mean by “delayer?” Do you mean that change-tracking is on and you want to see what changed? If so, you could try doing a change review, reject that particular change, but then immediately close the document without saving changes (i.e. the rejection).
-
Hi Craig,
I understand that whenever a document is modified the earlier version remains hidden under the new text, hence each time a document is modified the file size gets slightly larger. I also understand that it is possible to strip these layers back to see the earlier versions, which is presumably why most organisations send out documents in .rtf or .pdf and not .doc format.
Thanks and regards
Tony -
5th way: tell the reviewing to turn on tracking and then make his changes again.
Its the only way they’ll learn!
-
CompareIt is great tool to compare ms word and excel tools.

Lifehacker on 28 Mar 2007 at 4:32 pm
Microsoft Word Tip: How to compare two documents for differences
Someone edited your Word document without tracking changes and you need to easily see the updates. You’re not totally out of luck: the CodeJacked weblog details three ways to compare two Microsoft Word documents. You can use a built-in comparison…
Techzi » Blog Archive » Microsoft Word Tip: How to compare two documents for differences on 28 Mar 2007 at 5:20 pm
[…] You can use a built-in comparison feature of Word itself, an external program like WinMerge, or go all command line on Microsoft’s butt and use catdoc in Cygwin. In the midst of editing chapter 10 of Lifehacker the book, I realized tracking changes wasn’t enabled, but I had great success using DiffDoc to re-track ‘em. — Gina Trapani Comparing Two Versions of a Word Document [CodeJacked] […]
Brain Barn » Blog Archive » How to Find the Differences between Two Word Documents on 28 Mar 2007 at 7:17 pm
[…] Read the article here: Comparing Two Versions of a Word Document [CodeJacked.com] […]
How to Compare Two Versions of a Word Document by LifeSpy on 28 Mar 2007 at 9:38 pm
[…] I’ve worked as an editor before. Probably one of my used tools in Microsoft Word was the track changes feature. But sometimes, when some subeditors work on a document, they forget to enable this feature so the changes become lost in space. That can be a big hassle and a crimp on the workflow. Codejacked wrote about three ways to compare two versions of a Word Document. And here they are: […]
error is the mother of all inventions on 29 Mar 2007 at 6:10 am
how 2 keep track of changes done 2 ur word document.. thr some ways suggested here.. but how does ppl r not keeping the backup of the original b4 they r updating it.. puzzling rite
links for 2007-03-30 « Simply… A User on 29 Mar 2007 at 6:43 pm
[…] Comparing Two Versions of a Word Document at CodeJacked (tags: compare comparison lifehacks howto microsoft pro software documents office tips word tools **) […]
Pimp Your Work - Doh! Two Word docs and someone didn’t track changes, what now? on 30 Mar 2007 at 9:45 am
[…] What do you do? Personally I’ve had okay results with Word’s build-in tool. Lifehacker points to an article from Codejacked with some alternatives: You can use a built-in comparison feature of Word itself, an external program like WinMerge, or go all command line on Microsoft’s butt and use catdoc in Cygwin. In the midst of editing chapter 10 of Lifehacker the book, I realized tracking changes wasn’t enabled, but I had great success using DiffDoc to re-track ‘em. — Gina Trapani Source: Microsoft Word Tip: How to compare two documents for differences - Lifehacker […]
131 Applicazione per Email - InstantMessaging - Word - Exel e Altro | INFORMATICANET on 18 Oct 2007 at 6:57 am
[…] Compare File Versions: If you’ve had someone edit your document, but they left you with no way to track their changes, you can find yourself spending a lot of time trying to find them. Use this tutorial to make comparing file versions a lot easier. […]
Virtual Hosting Blog » 100 Essential Web Resources for Freelance Programmers on 10 Jan 2008 at 5:39 pm
[…] Compare File Versions: Stay on top of changes to your documents by using this program. […]