Skip to main content

How to batch convert .doc files to .docx format in Word?

Author: Siluvia Last Modified: 2025-01-24

If you've received multiple Word documents in the older 97-2003 .doc format, converting them individually to the modern .docx format can be time-consuming. This guide introduces two efficient methods to batch convert .doc files to .docx: using VBA code or the powerful Kutools for Word add-in.

Batch convert .doc files to .docx format with VBA code
Batch convert .doc files to .docx format with Kutools for Word


Batch convert .doc files to .docx format with VBA code

This section demonstrates how to use VBA code to convert all .doc format files in a specified folder into .docx files at once. Follow the steps below:

  1. Gather all the .doc files you want to convert into a single folder.
  2. Press Alt + F11 to open the Microsoft Visual Basic for Applications window.
  3. In the VBA window, click Insert > Module. Copy and paste the following VBA code into the Module window:
    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
    The VBA code is pasted into the Module window
  4. Press F5 to run the code. In the Browse window that appears, select the folder containing your .doc files and click OK.
    Browse window

All .doc format files in the selected folder will be converted to .docx files immediately, as shown in the screenshot below:

All .doc format documents are converted to .docx documents

Batch convert .doc files to .docx format with Kutools for Word

This section introduces a handy utility for batch conversion. With the Doc/Docx utility in Kutools for Word, you can easily convert all .doc format documents in a folder to .docx format in just a few clicks. Follow these steps:

Kutools for Word, equipped with AI πŸ€–, offers over 100 handy features to simplify your tasks.
  1. In a blank document, click Kutools Plus > Doc/Docx.
    Doc/Docx button on the ribbon
  2. In the Document Format Converter window, follow these steps:
    1. Select Doc to Docx from the Format Convert drop-down menu.
    2. Click Add button to add documents you need to convert:
      • Choose Files to add individual documents.
      • Choose Folder to add all documents from a specific folder.
    3. By default, PDF files will be saved to the same location as the source files. To change the location, click the Browse button Browse button and choose a new destination.
    4. Optionally, check the Delete source files after conversion box to remove the original files after the PDFs are created.
    5. Optionally, check the Keep the modified date of original files box to retain the original file metadata.
    6. Once all settings are complete, click Ok.
    Document Format Converter dialog box
  3. Once the conversion is complete, a dialog box will appear indicating how many documents have been successfully converted. Click the OK button and close the Document Format Converter window.

Now, all .doc format documents have been successfully converted to .docx files.

Kutools for Word is the ultimate Word add-in that streamlines your work and boosts your document processing skills. Get It Now!

Best Office Productivity Tools

Kutools for Word - Elevate Your Word Experience with Over 100 Remarkable Features!

πŸ€– Kutools AI Features: AI Assistant / Real-Time Assistant / Super Polish (Preserve Format) / Super Translate (Preserve Format) / AI Redaction / AI Proofread...

πŸ“˜ Document Mastery: Split Pages / Merge Documents / Export Selection in Various Formats (PDF/TXT/DOC/HTML...) / Batch Convert to PDF...

✏ Contents Editing: Batch Find and Replace across Multiple Files / Resize All Pictures / Transpose Table Rows and Columns / Convert Table to Text...

🧹 Effortless Clean: Sweap away Extra Spaces / Section Breaks / Text Boxes / Hyperlinks / For more removing tools, head to the Remove group...

βž• Creative Inserts: Insert Thousand Separators / Check Boxes / Radio Buttons / QR Code / Barcode / Multiple Pictures / Discover more in the Insert group...

πŸ” Precision Selections: Pinpoint Specific Pages / Tables / Shapes / Heading Paragraphs / Enhance navigation with more Select features...

⭐ Star Enhancements: Navigate to Any Location / Auto-Insert Repetitive Text / Toggle Between Document Windows / 11 Conversion Tools...

🌍 Supports 40+ Languages: Use Kutools in your preferred language – supports English, Spanish, German, French, Chinese, and 40+ others!

Kutools and Kutools Plus tabs on the Word Ribbon
πŸ‘‰ Want to try these features? Download Kutools for Word now! πŸš€
 

Best Office Productivity Tools

Kutools for Word - 100+ Tools for Word