How to batch convert .doc format files to .docx in Word?
Supposing you have received some 97-2003 format Word documents, how can you batch convert all these .doc format documents to .docx format at once? This article will show you two methods to solve this problem.
This section is going to show you the VBA code to convert all .doc format documents in a specified folder to .docx documents at once. Please do as follows.
1. Please collect all .doc format documents you will convert to .docx in a specified folder.
2. Press the Alt + F11 key to open the Microsoft Visual Basic for Applications window.
3. In the window, click Insert > Module. Then copy below VBA code into the Module window.
VBA code: Batch convert all .doc format documents to .docx in a certain folder
Sub ConvertDocToDocx() 'Updated by ExtendOffice 20181128 Dim xDlg As FileDialog Dim xFolder As Variant Dim xFileName As String Application.ScreenUpdating = False Set xDlg = Application.FileDialog(msoFileDialogFolderPicker) If xDlg.Show <> -1 Then Exit Sub xFolder = xDlg.SelectedItems(1) + "\" xFileName = Dir(xFolder & "*.doc", vbNormal) While xFileName <> "" Documents.Open FileName:=xFolder & xFileName, _ ConfirmConversions:=False, ReadOnly:=False, AddToRecentFiles:=False, _ PasswordDocument:="", PasswordTemplate:="", Revert:=False, _ WritePasswordDocument:="", WritePasswordTemplate:="", Format:= _ wdOpenFormatAuto, XMLTransform:="" ActiveDocument.SaveAs xFolder & Replace(xFileName, "doc", "docx"), wdFormatDocumentDefault ActiveDocument.Close xFileName = Dir() Wend Application.ScreenUpdating = True End Sub
4. Press the F5 key to run the code. In the opening Browse window, select the folder contains the .doc format documents and click OK. See screenshot:
Then all .doc format documents are converted to .docx documents immediately as below screenshot shown.
A handy utility will be recommended in this section. With the Doc/Docx utility of Kutools for Word, you can easily convert all .doc format documents in a folder to .docx documents. Please try as follows.
1. Please collect all .doc format documents in a specified folder, then click Kutools Plus > Doc/Docx. See screenshot:
2. In the Document Format Converter dialog box, you need to do as follows:
2.1) Select the folder contains .doc format documents in the Source file folder section;
2.2) Select Convert doc to docx from the Format Convert drop-down list;
2.3) By default, the Destination path same as source box is checked. If you want to place all converted .docx documents in the same folder, just keep this option selected;
If you want to separate the .docx documents and the source .doc documents, please uncheck the Destination path same as source box, and select a new folder to save the .docx documents in the Save to box;
2.4) Click the Start button. See screenshot:
3. Then a dialog box pops up to tell you how many documents have been successfully converted, click the OK button and close the Document Format Converter window.
Now all .doc format documents are converted to .docx files. See screenshot:
If you want to have a free trial of this utility, please go to free download the software first, and then go to apply the operation according above steps.
Kutools for Outlook
More than 100 Advanced Functions for Outlook 2010, 2013, 2016, 2019 and 365