Solved

Batch conversion

Posted on 2013-01-02
11
426 Views
Last Modified: 2013-01-02
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.
0
Comment
Question by:ddantes
  • 5
  • 5
11 Comments
 
LVL 3

Expert Comment

by:tsnirone
ID: 38738426
0
 
LVL 13

Expert Comment

by:Yagya Shree
ID: 38738473
First read this post

http://www.groovypost.com/howto/howto/convert-microsoft-works-wps-files-to-word-docx/

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

http://www.zamzar.com/convert/wps-to-doc/
0
 

Author Comment

by:ddantes
ID: 38738488
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.
0
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 
LVL 3

Accepted Solution

by:
tsnirone earned 500 total points
ID: 38738516
Would this way of automatic the wps converter - help:

http://help.wugnet.com/office/Batch-convert-Works-Word-2007-ftopict1116660.html

?
0
 

Author Comment

by:ddantes
ID: 38738546
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.
0
 
LVL 3

Expert Comment

by:tsnirone
ID: 38738589
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.
0
 

Author Comment

by:ddantes
ID: 38738648
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, _
FileFormat:=wdFormatDocument97
oDoc.Close SaveChanges:=wdDoNotSaveChanges
strFileName = Dir$()
Wend
Options.ConfirmConversions = bConv
End Sub
0
 
LVL 3

Expert Comment

by:tsnirone
ID: 38738662
I'm sorry but I think you need to do it in two steps. First to .doc then from .doc to .docx.

http://blogs.msdn.com/b/ericwhite/archive/2008/09/19/bulk-convert-doc-to-docx.aspx

or

http://www.ehow.com/how_6931626_batch-convert-doc-docx.html
0
 

Author Comment

by:ddantes
ID: 38738698
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.
0
 
LVL 3

Expert Comment

by:tsnirone
ID: 38738717
I believe the limitation is not in the macro but in the converter the macro is using.

From:
http://blogs.msdn.com/b/ericwhite/archive/2008/09/19/bulk-convert-doc-to-docx.aspx

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.
0
 

Author Closing Comment

by:ddantes
ID: 38738809
An Expert was able to edit the macro so that it converts wps to Word 2007 docx files.  Thank you.
0

Featured Post

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Nice table. Huge mess. Maybe this was something you created way back before you figured out tabs or a document you received from someone else. Either way, using the spacebar to separate the columns resulted in a mess. Trying to convert text to t…
A few years ago I was very much a beginner at VBA, and that very much remains the case today.  I'll do my best to explain things as I go in the hope that other beginners can follow.  If you just want to check out a tool that creates a Select Case fu…
This video teaches the viewer how to align pictures around text while keeping the text properly aligned in the document.
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.

785 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