Solved

Batch convert .doc to .docx

Posted on 2016-08-30
13
1,356 Views
Last Modified: 2016-09-02
I have a vault with  folder hierarchy with  different types of documents in it   ( Under Root folder it can have Folder1, Folder2....... Under Folder1 it can have Folder1_1, Folder1_2 ....

I have many .doc files inside the vault .  Because of some issues all the .doc files need to be converted to .docx format ( Word 2013)

Is there a utility to batch convert from .doc to .docx ?  ( The folders may have other types of files in it, like excel or pdf . It need to be left as it is)

I downloaded some BatchDocxConverter . But never worked in Windows 7  
 Other option I have is writing a small utility (Macro or .net) .   But Is there a standard proven free one for this ?
0
Comment
Question by:Sam OZ
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
13 Comments
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41776445
http://docxtodoc.net/download.html

It should work in Win7.  Was there some error or other problem?
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41776458
You can do this from the CMD (command prompt) of your windows
Navigate to the path with change directory with dir c:\mypath (substituting C: with the drive and mypath with your folder
then type in ren *.doc *.docx
or
rename *.doc *.docx

and repeat for every subfolder
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41776507
You can also use a script to do this:

Option Explicit

Dim objFSO, objFolder, objFile, strNewName, strOldName
Dim strPath, strName

Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objFolder = objFSO.GetFolder("c:\test")		  'set your folder
For Each objFile In objFolder.Files
  ' Check if file name ends with ".doc".
  If (Right(LCase(objFile.Name), 4) = ".doc") Then
    ' Rename the file.
    strOldName = objFile.Path
    strPath = objFile.ParentFolder
    strName = objFile.Name
    ' Change name by changing extension to ".docx"
    strName = Left(strName, Len(strName) - 4) & ".docx"
    strNewName = strPath & "\" & strName
    ' Rename the file.
    Wscript.Echo strOldName & " : " & strNewName
'     objFSO.MoveFile strOldName, strNewName
  End If
Next

Open in new window

0
Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 24

Expert Comment

by:Brian B
ID: 41776528
xtermie, your efforts are appreciated, but I think the person asking the question wants to change the file *format* not just the file *name*. Your answers are simply renaming the files.

Thanks,
Brian (TBone2K)
Topic Advisor
0
 
LVL 18

Assisted Solution

by:xtermie
xtermie earned 250 total points
ID: 41776557
I don't think that would be an issue (renaming) between Word documents as it is from .doc to .docx, and not backwards to worry about compatibility issues.
The renaming should work just fine in this case.

But, anyway...Another way would be to run a macro from word to open all doc files and saving them as docx
Open Word, Hit Alt+F11, copy - paste the macro
type in your folder and then Run the macro
Dim file
Dim path As String
path = "C:\Test\"           'your folder here

file = Dir(path & "*.doc")
Do While file <> ""
Documents.Open FileName:=path & file
ActiveDocument.SaveAs2 FileName:=path & file, FileFormat:=wdFormatXMLDocument, LockComments:=False, Password:="", _
        AddToRecentFiles:=True, WritePassword:="", ReadOnlyRecommended:=False, _
        EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False, SaveFormsData _
        :=False, SaveAsAOCELetter:=False, CompatibilityMode:=15
ActiveDocument.Close
file = Dir()
Loop
End Sub

Open in new window

0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41776720
>>I don't think that would be an issue (renaming) between Word documents as it is from .doc to .docx,

I hope you do understand that a .docx is NOT the same format as a .doc document, you can not just rename them.  Also note the asker does explicitly say convert the format.
0
 
LVL 54

Assisted Solution

by:Joe Winograd, EE MVE 2015&2016
Joe Winograd, EE MVE 2015&2016 earned 250 total points
ID: 41777542
I haven't tried it, but the macro here by Graham Mayor looks promising:

http://answers.microsoft.com/en-us/office/forum/office_2007-word/is-it-possible-to-convert-a-batch-of-doc-files-to/8f5549be-8143-4f0a-8f82-06c855fcb092

The version on the first page handles just a single folder. Go to the second page, where Graham posted a version that recurses into subfolders, but note the caveats at the top of the post. Regards, Joe
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41777648
A .docx file is a Microsoft Word XML Format Document file
Off course I understand the difference AndyAinscow, that's why I posted that macro that does just what the author asks.
Opens all .doc in a folder and SaveAs .docx (which converts them).
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41777765
>>Off course I understand the difference AndyAinscow
Your first two comments didn't show that at all.  The third started with a sentence implying you thought there was no difference.
0
 
LVL 18

Expert Comment

by:xtermie
ID: 41777813
Andy I have a clear understanding of the difference, but from my experience in handling such files, even if you just rename a .doc to .docx there are no issues, as you are going forward to the latest file format and not backwards.  If you tried the opposite there could be problems (convert .docx to .doc).  We have done this with several files (and rather complicated ones) in my organization and have no issues whatsoever.  And anyhow, we are here to help the author of the question solve their issues with our comments. The macro I provided to SaveAs does what the author wants; what is the point of your comments on my understanding of doc types?
0
 
LVL 18

Accepted Solution

by:
xtermie earned 250 total points
ID: 41777816
...and digging around, I found this very helpful blog post which claims to do exactly what the author wants (if they don't want to use my macro)

https://blogs.msdn.microsoft.com/ericwhite/2008/09/18/bulk-convert-doc-to-docx/
0
 

Author Comment

by:Sam OZ
ID: 41781091
thanks
0
 
LVL 44

Expert Comment

by:AndyAinscow
ID: 41781114
>>what is the point of your comments on my understanding of doc types?

I agree helping the asker with the question is important.  
In addition if an expert attempting to help apparently shows they do not understand the difference between two things is it not important that is corrected.  It could give the asker (or others that look at this question) the impression there is no difference between a .doc and a .docx format.

>>even if you just rename a .doc to .docx there are no issues
I've just create a simple word doc and saved in the .doc format.  I have then renamed it to have the extension .docx

SNAG-0019.bmpThen I attempt to open it and receive the above error, roughly translated: Can't open the file as it is not a docx format
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

All of the resources available today make learning a new digital media easier than ever-- if you know where to begin. This is a clear, simple guide to a few of the basic digital art mediums and how to begin learning them on your own.
There are many software programs on offer that will claim to magically speed up your computer. The best advice I can give you is to avoid them like the plague, because they will often cause far more problems than they solve. Try some of these "do it…
Learn how to make your own table of contents in Microsoft Word using paragraph styles and the automatic table of contents tool. We'll be using the paragraph styles in Word’s Home toolbar to help you create a table of contents. Type out your initial …
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

707 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question