Converting Many DOC Files to DOCX

by Allen Wyatt
(last updated April 29, 2017)

Christian has a folder full of DOC files that he needs to convert to DOCX files. He wonders if there is a quick way to convert them without opening and saving each one individually.

Microsoft does not provide this functionality in Word, nor do they provide an add-in to do the conversions. You can, however, create your own macro to do the conversions. A rather simple approach is shown here:

Sub ConvertBatchToDOCX()
    Dim sSourcePath As String
    Dim sTargetPath As String
    Dim sDocName As String
    Dim docCurDoc As Document
    Dim sNewDocName As String

    ' Looking in this path
    sSourcePath = "c:\Users\Administrator\Desktop\Testing\"
    sTargetPath = "c:\Users\Administrator\Desktop\Converted\"

   ' Look for first DOC file
    sDocName = Dir(sSourcePath & "*.doc")
    Do While sDocName <> ""
        ' Repeat as long as there are source files
        'Only work on files where right-most characters are ".doc"
        If Right(sDocName, 4) = ".doc" Then
            ' Open file
            Set docCurDoc = Documents.Open(FileName:=sSourcePath & sDocName)

            sNewDocName = Replace(sDocName, ".doc", ".docx")

            With docCurDoc
                .SaveAs FileName:=sTargetPath & sNewDocName, _
                .Close SaveChanges:=wdDoNotSaveChanges
            End With
        End If
        ' Get next source file name
        sDocName = Dir
    MsgBox "Finished"
End Sub

In order to use the macro, you'll need to make two changes. First, specify in the sSourcePath variable the full path (followed by a backslash) to the directory that contains the files you want to convert. Then, in the sTargetPath variable, specify the full path (with trailing backslash) of the directory in which the converted documents should be stored.

The macro then steps through all the DOC files it finds in the source directory, opens them, and saves them as DOCX files in the target directory.

Note that I mentioned this is a simple approach. The reason is because it does no error checking on its work. For instance, if you ran this macro twice in a row, you would get errors because the files being saved in the target directory already exist. Further, you should understand that this converts all the DOC files to DOCX files. In other words, if the original file has macros in it, those macros will be stripped off in the conversion process.

Finally, notice that the heart of the macro is contained within an If / Then structure that checks to make sure the rightmost 4 characters of the filename are actually ".doc". This is done because of the rather aggravating behavior of the Dir function on some systems where searching for the pattern "*.doc" will return as a match any filename that contains .doc. This means that it also returns files ending in .docx and .docm. Obviously, these should not be converted, so the If / Then structure is included to weed them out.

If you prefer to not use your own macro, there are third-party solutions you could use. The following page on Graham Mayor's site features a free add-in that will, among other things, do the document conversion:

You may be able to locate other similar converters by doing a web search for "doc docx converter" (without the quote marks).

WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (643) applies to Microsoft Word 2007, 2010, 2013, and 2016.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...


Converting Strings to Numbers

When creating macros, you often need to convert a text string that contains numbers into actual numeric values. You do ...

Discover More

Editing Graphic Objects

Want to change the way that a graphics object appears in your worksheet? You need to edit it, then, using the techniques ...

Discover More

Exporting a Graphics Group

Need to export a graphics group from a chart so that you can use the group in a different program? It's not as easy as ...

Discover More

Do More in Less Time! Are you ready to harness the full power of Word 2013 to create professional documents? In this comprehensive guide you'll learn the skills and techniques for efficiently building the documents you need for your professional and your personal life. Check out Word 2013 In Depth today!

More WordTips (ribbon)

Using Header Information as the Filename

Save a document for the first time, and Word helpfully suggests a filename you can use or change. If you want this ...

Discover More

Understanding the PDF/A Format

Word allows you to save your documents in PDF format so others can easily view them. You may not know, however, that Word ...

Discover More

Converting to Word 6.0 Format

Need to convert your document to a really old format previously used in Word? The solution may already be built into the ...

Discover More

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.


If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 1 + 8?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)

This Site

Got a version of Word that uses the ribbon interface (Word 2007 or later)? This site is for you! If you use an earlier version of Word, visit our WordTips site focusing on the menu interface.

Newest Tips

FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.