Batch conversion

Running Microsoft Office 2007 on a Windows 7 SP-1 platform, I have a question regarding batch conversion of a file type.   I have around one thousand files in Works 2000 Word Processor format, file extension = .wps.   These files are distributed in dozens, or hundreds of folders.  I would like to convert these documents to .docx files, or even better, create copies of them with .docx extension and retain the original files.   I can convert a single .wps file by opening it in Word 2007 and saving it a s a Word document.  Is there a way to accomplish this en masse, without having to convert each file individually?   The conversion seems to require the Microsoft Office text converter.  If I simply rename the file extension of a .wps file to .docx, it can't be opened in Word due to "corruption."   I can also change the default program for .wps files to Microsoft Word.  But this doesn't save a copy of the .wps file in .docx format, unless each file is opened individually and then saved individually.
Who is Participating?
tsnironeConnect With a Mentor Commented:
Would this way of automatic the wps converter - help:

Yagya ShreeCommented:
First read this post

If you are able to follow the steps then good.

If not than look into the link below:

Use this online tool to conver them to doc files in mass
Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

ddantesAuthor Commented:
Dear tsnirone: Thank you for your comment.  However, that article describes how to install the text converter, which I already have.  I am looking for a method of converting a large number of wps files, in different folders, to docx.  That article would only accomplish one file at a time.  

Dear yagyashree:  Thank you for your comment.  The first post describes how to change the default program associated with the .wps file extension.  I have already done that, and it does allow me to open one .wps file at a time, and save it in .docx format.  However, it doesn't help me perform this function as a batch operation.

Regarding the Zamzar service, it would require collecting and uploading over one thousand files, then receiving the converted files and distributing them to perhaps one hundred folders.  So, unfortunately, it isn't a viable option for me.
ddantesAuthor Commented:
Thank you for your comment.  I had seen that article.  Although the title of the article uses the phrase "Word 2007", the macro described in the article converts .wps files to .doc in Word 97 format, not .docx Word 2007 format.  Even so, I would have liked to try the macro.  I wasn't able to follow the author's instructions for installing the macro in Word 2007 -- it didn't install.  And if I ran it as a .bat file within a folder containing .wps files, they were not converted.
I am sorry. Out of ideas. I would think that your best bet is the macro way of accessing the converter. It seems to have worked for the other person in that thread. Perhaps try again to install it?

Batch-converting from doc to docx seems a bit easier.
ddantesAuthor Commented:
Understood.  I have now gotten the macro to work, but it converts .wps to .doc (Word 97) instead of .docx (Word 2007).   Can you adjust this macro so that it converts to the correct document type and file type?   I tried changing instances of "DOC" to "DOCX" and it seemed to convert the files to .docx files, but they were corrupted and could not be opened.

Sub Batch_Save_WPS_as_DOC97()
Dim bConv As Boolean
Dim strFileName As String
Dim strDocName As String
Dim strPath As String
Dim oDoc As Document
Dim Response As Long
Dim fDialog As FileDialog

bConv = Options.ConfirmConversions
Options.ConfirmConversions = False
Set fDialog = Application.FileDialog(msoFileDialogFolderPicker)
With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = False
.InitialView = msoFileDialogViewList
If .Show <> -1 Then
MsgBox "Cancelled By User", , "Save all as DOC"
Exit Sub
End If
strPath = fDialog.SelectedItems.Item(1)
If Right(strPath, 1) <> "\" Then strPath = strPath + "\"
End With

If Documents.Count > 0 Then
Documents.Close SaveChanges:=wdPromptToSaveChanges
End If

strFileName = Dir$(strPath & "*.wps")

While Len(strFileName) <> 0
Set oDoc = Documents.Open(strPath & strFileName)

strDocName = ActiveDocument.FullName
intPos = InStrRev(strDocName, ".")
strDocName = Left(strDocName, intPos - 1)
strDocName = strDocName & ".doc"
oDoc.SaveAs FileName:=strDocName, _
oDoc.Close SaveChanges:=wdDoNotSaveChanges
strFileName = Dir$()
Options.ConfirmConversions = bConv
End Sub
I'm sorry but I think you need to do it in two steps. First to .doc then from .doc to .docx.

ddantesAuthor Commented:
That's bad news!   The start of the instructions states:  "Move all your ".DOC" files to a single folder".   There are many files, in many folders, and I don't want to be collecting them, processing them, and then redistributing them to their original locations.   Sorry that won't work for me.   I'll post a question under programming to see if someone can edit the macro.
I believe the limitation is not in the macro but in the converter the macro is using.


I read this:
The SourcePathTemplate and DestinationPathTemplate provide extremely flexible configuration for bulk conversion of a large number of directories.  They allow an IT professional to, say, convert files from one entire server, place the converted files on a different server, and use various sub-paths of the path of the source document to form the path where the DOCX will be placed.  Fully configuring SourcePathTemplate and DestinationPathTemplate is beyond the scope of this blog post.  The configuration above basically specifies to just take all of the DOC files in the specified fldr directory, and place them in the specified DestinationPathTemplate directory.
ddantesAuthor Commented:
An Expert was able to edit the macro so that it converts wps to Word 2007 docx files.  Thank you.
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.