9

I wish to convert a large number of office files into the newer versions, eg. .doc's to .docx's. I need something for all of the difference MS office application filetypes.

What is the best tool for the job(Windows xp)?

I'm looking for something free (beer), and can manage a large number of files (doing this by manually opening files just isn't viable).

Thanks.

0

5 Answers 5

7
+100

The answer is structured to convert all documents, not just Word documents.

Say you got tons of Excel sheets, PowerPoint presentations and Word documents on your computer that were written in Office XP or 2003. How do you convert all these files to the new Office 2007 format.

One option is that you open all of them in the associated Office program and manually save them in the newer (docx, xlsx or pptx) format. Or follow these steps and convert all documents in one go.

Step 1: Download Migration Manager kit and extract it into a new folder - say: c:\office.

office-pack

Step 2: Download and install the Office Pack - this step is required even if you have Microsoft Office 2007 already installed on your computer.

Step 3: Assuming that you extracted the Office Manager files in c:\office directory, go c:\office\tools, open ofc.ini using notepad and add the following line.

fldr=c:\users\labnol\documents

This refers to the folder location that holds your office files. I am pointing this to my Documents folder but it could be different on your machine.

Step 4: Open command prompt and go to c:\office\tools. There you’ll see a utility called ofc.exe - this is the Office File Converter that will convert all old Office files to the new 2007 Office document format in bulk. Run.

convert-docs

Immediately all old Office files in that folder (and sub-folders) will get converted to the new format and are saved in a new folder.

This utility works with Word (doc to docx), Access databases, PowerPoint (ppt to pptx), Visio diagrams, Excel (xls to xlsx) and Microsoft Project files. The conversion may however fail for password protected documents.

Taken from here.

3
  • Thanks, exactly what i needed. It's hard to pick an overall best answer to accept but, this gave me the info i needed so...sorry to you other two :(
    – Dmatig
    Sep 2, 2009 at 17:24
  • not to worry folks - once I dream up of a tough qn i'll put this reputation points to work, and return it to the SU community. Thanks dmatig!
    – caliban
    Sep 2, 2009 at 17:28
  • this doesn't seem to work too well with office 2016, as it mysteriously gives an error "failed to convert" without logging anything. The wordconvert below works.
    – Dan
    Oct 19, 2016 at 1:08
6

The following vba macro will convert all the docs in a selected folder

Sub SaveAllAsDOCX()
Dim strFileName As String
Dim strDocName As String
Dim strPath As String
Dim oDoc As Document

With Dialogs(wdDialogCopyFile)
If .Display <> 0 Then
strPath = .Directory
Else
MsgBox "Cancelled by User"
Exit Sub
End If
End With

If Documents.Count > 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If
If Left(strPath, 1) = Chr(34) Then
strPath = Mid(strPath, 2, Len(strPath) - 2)
End If
strFileName = Dir$(strPath & "*.doc")

While Len(strFileName) <> 0
Set oDoc = Documents.Open(strPath & strFileName)

strDocName = ActiveDocument.FullName
intPos = InStrRev(strDocName, ".")
strDocName = Left(strDocName, intPos - 1)
strDocName = strDocName & ".docx"
oDoc.SaveAs FileName:=strDocName, _
FileFormat:=wdFormatDocumentDefault
oDoc.Close SaveChanges:=wdDoNotSaveChanges
strFileName = Dir$()
Wend
End Sub

credit to Graham Mayor - Word MVP

2

Bulk Convert DOC to DOCX

Microsoft has a bulk conversion utility that can convert multiple DOC files to DOCX files. This blog post presents very basic information on its use.

1

I made a batch file for use with Office 2010. It is free, but office isn't. This DOES delete the original file. If you don't want it to, get rid of the second line. Paste the code into a batch file.

for /r "SOME PATH TO TRAVERSE" %%a in ("*.doc") do (
"YOUR PATH MIGHT BE DIFFERENT C:\Program Files\Microsoft Office\Office14\Wordconv.exe" -oics -nme "%%a" "%%ax"
del "%%a"

)

3
  • 1
    This is a poor solution compared to the command line tool that exists by Microsoft.
    – Ramhound
    Dec 10, 2012 at 18:32
  • Doesn't require the Office Pack though. Apr 16, 2013 at 7:24
  • path for office 2016 (x86 ver): C:\Program Files (x86)\Microsoft Office\root\Office16\Wordconv.exe
    – Dan
    Oct 19, 2016 at 1:09
0

I can't take credit for this solution as I obtained it from Microsoft forums. Reposting here for convenience:

  1. Put all .doc files to a folder e.g. **D:\doc**.

  2. Open Word and press Alt+F11 to open the VBA editor.

  3. Now click “Normal” project and click “Insert” > “Module” to insert a new module in the project.

  4. Double click the module to open the editing area and paste the following code:

     Sub TranslateDocIntoDocx()
       Dim objWordApplication As New Word.Application
       Dim objWordDocument As Word.Document
       Dim strFile As String
       Dim strFolder As String
    
       strFolder = "D:\doc\"
       strFile = Dir(strFolder & "*.doc", vbNormal)
    
       While strFile <> ""
         With objWordApplication      
           Set objWordDocument = .Documents.Open(FileName:=strFolder &strFile, AddToRecentFiles:=False, ReadOnly:=True, Visible:=False)
    
           With objWordDocument
             .SaveAs FileName:=strFolder & Replace(strFile, "doc", "docx"), FileFormat:=16
             .Close
           End With
         End With
         strFile = Dir()
       Wend   
    
       Set objWordDocument = Nothing
       Set objWordApplication = Nothing
     End Sub
    
  5. Click “Run” button. Seconds later, you will find all .doc files have been converted to .docx files. The original .doc files will remain.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .