How to diff Word documents


John Lawrence responded to someone’s question about how to diff MS Word documents, and I thought the answer would help a few more folks.

Team Foundation enables you to specify different diff and merge tools for different file types.

We don’t have a built in compare tool for .doc files but I did a quick search and found quite a few available for download (e.g. http://www.documentlocator.com/download/difftools.htm). I don’t know if we have any specific recommendations.

I installed DiffDoc (because it was free… http://www.softinterface.com/MD/MD.htm) and configured it to be my diff tool for .doc files:

  1. Navigate to Tools->Options->Source Control->Visual Studio Team Foundation
  2. Click the Configure User Tools button
  3. In the dialog that pops up, click Add
  4. Enter ‘.doc’ (no apostrophes) in the Extension field to indicate you’re adding a comparison tool for .doc files
  5. For the Command field, click “…” and navigate to your diff tool exe (in my case “C:Program FilesSoftinterface, IncDiffDocDiffDoc.exe”)
  6. Then enter the command line parameters to drive your specific diff tool. %1 expands to be the original file, %2 expands to the new one. In this case, enter “/M%1 /S%2″ in the Arguments text box (without the quotation marks).

That should do it – next time you try and view a diff of .doc files, it will launch this tool and you should be able to compare them.

Comments (11)

  1. Buck Hodges says:

    Now that the RC is out, I thought I’d post a summary with links to version control posts from the last…

  2. Uday Kadam says:

    How can I compare two word document files and show changes in another file like in VSS style ?

  3. buckh says:

    Uday, I’m not aware of a tool that would do that.

    Buck

  4. James says:

    Word also has a built in feature for comparing documents.  

  5. Will Strohl says:

    I just tried that software on a DOCX diff, and it said they were the same, when they really weren't.  :(

  6. vicsoft.info says:

    Winmerge has a good plugin working with Office 2007 formats even not having Office installed. <a href="vicsoft.info/blog out</a>

  7. Josef B. says:

    Why do you say that DiffDoc is free?  The standard version will not do Word docs, you have to buy the Professional version.  Another loss leader strategy that wastes time and sometimes money.

  8. buckh says:

    Josef, it may have changed in the 5 years since I wrote the post.

    Buck

  9. C# coder says:

    5 yrs and still your post is still kept much alive by people searching for it in search engines find your post on the top search results… obviously nothing significant have changed since :)

  10. mark says:

    Sounds like a good opportunity for someone to create a new tool.

  11. xdhmoore says:

    I just decided to do all my documents in latex. Those are easily diffed.  (just kidding).