In this tutorial, I will guide to you 2 ways to convert doc to docx by VBA code or manually? Just with 2 simple ways below is enough so that you are now no longer worry about your systems can not display Word .docx documents.
Known or not, MS Word application version 2007 and upper versions have changed the file extension from .doc to .docx. And for some old computer with lower operating systems, this cause a problem because Office 2003 can not read .docx file extension.
However, there’s always a way for those who still experience Office 2003 or lower versions of Word before 2007. This tip I’m gonna share with you today is how to convert .doc file to .docx, to helps presenting document better, saving time and improve file processing. One good thing about it is that you can do it directly in Word without any installation.
I. Convert doc to docx Using VBA code.
Step 1: First you should move all your document with file extension .doc into one folder.
The name of the file should not include accents or special characters.
Step 2: Open a new Word file that is not in the same folder with the files to convert.
Press Alt + F11 or Fn + Alt + F11 to open VBA code.
Step 3: Appeared the VBA Microsoft Visual Basic for Application. Click on Insert and choose Module.
Then copy this code below.
‘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:= _
ActiveDocument.SaveAs xFolder & Replace(xFileName, “doc”, “docx”), wdFormatDocumentDefault
xFileName = Dir()
Application.ScreenUpdating = True
Paste it in the Module window.
Click RunSub/User From or press F5 to proceed.
Step 4: A new window will appear. At this step choose the file to convert.
The converting will start soon. After a while you can comeback to the folder at the beginning to check on the result.
II. Convert manually .doc to .docx or vice versa.
This method is only available for version 2007 and upper.
Open the file to convert. The file extension I’m showing below is .docx. Now I’m gonna proceed to convert it to .doc.
Step 1: Go to File and choose Save As. Select on Browse to choose where to save the file when finish converting.
Step 2: Choose the folder to save. You can save it at anywhere easy to find.
Then at the Save as type section choose the exact type you want from the options given. Then click Save.
The result after converting, the file now has the file extension as .doc.
Just with 2 simple ways above is enough so that you are now no longer worry about your systems can not display Word .docx documents. With these method you don’t have to install a third party application, or using online website, or copy all the content to a new .docx blank file, which is a waste of time. Instead with VBA code, everything is just in a blink of an eye. Also, if you find it too hard to use VBA code, or you don’t remember the code, it’s OK to use the mannual way, but you should just use it in a small number of documents.
The tutorial is also ended here. Hope you will find it useful and don’t forget to stay tune for other posts as well. Good luck!
Hi. You can use a free online tool to convert DOC to DOCX https://freetools.site/document-converters/doc-to-docx