Batch convert .doc to .docx (and equivilent for other office formats)?

Solution 1:

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.

Solution 2:

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

Solution 3:

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.