Trick for diffing two MS-Word files

  • Thread starter Jonathan Aquino
  • Start date
J

Jonathan Aquino

Just wanted to share this effective trick for diffing two MS-Word
files (the built-in MS-Word file-compare can't handle extreme
differences):

1. Convert the old and new MS-Word files into text files, with one
word per line (a good text editor with regular-expression replace
makes this easy)
2. Use WinMerge (or other diff utility) to diff the two text files.

Works great!

Also works for other word-processor formats e.g. OpenOffice.

Jon
 
W

Wald

Just wanted to share this effective trick for diffing two MS-Word
files (the built-in MS-Word file-compare can't handle extreme
differences):

1. Convert the old and new MS-Word files into text files, with one
word per line (a good text editor with regular-expression replace
makes this easy)

I don't get it: why do you convert to one word per line? Just save the docs
as TXT files and diff them...

Or am I missing something?

Wald
 
K

Kerry Liles

Maybe it is to avoid tripping over differences in white space (one space
between words versus two)?
Or spaces versus a tab character?

Just a guess.
 
A

Adrian Carter

Wald said:
I don't get it: why do you convert to one word per line? Just save the docs
as TXT files and diff them...

Or am I missing something?

Saving as plain text, each MS Word paragraph appears in your .txt file
as a single long line. So the insertion of a single word into a paragraph
will render the corresponding pair of long lines as a nomatch.
OTOH, if you saves as "Text only with line breaks", your .txt files
will look much more like they appear on screen in MS Word.
If you want to go the plain text w/o line breaks route, AsciiDiff
lets you avoid the intermediate "save as" step by pasting the Word
(or other wp or Excel) document contents or part thereof directly
into the comparison entry screen.

http://www.homestead.com/adriancarter/compare.html

Adrian
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top