Converting old MS Word 5.1 documents to a current format

Today I had to help rescue some old files. I had a bunch of Microsoft Word docs spanning 1997 to 2012. Word for Mac 2011 can't open documents created by MS Word 5.1 (the version that created the docs from 1997 through 2001), however Word for Mac 2004 can. I copied all the documents over to Christy's laptop (that has Word for Mac 2004) to open the old doc, then 'Save As...' to create the newer versioned document so that Word for Mac 2011 could open them. Search the web, I found this handy applescript from a post by 'etna' on discussions.apple.com. Reposting here so I can find it again if I need it.

set inputfolder to (choose folder) as text

set destFolder to (choose folder) as text

set theFiles to list folder inputfolder without invisibles

activate application "Microsoft Word"

repeat with x from 1 to count of theFiles

          set thefile to item x of theFiles

          set inputfile to (inputfolder & thefile)

          tell application "Microsoft Word"

  open file inputfile

  save as document 1 file name (destFolder & thefile & ".doc")

  close document 1 saving no

          end tell

end repeat