View Single Post
  #3   Report Post  
Posted to microsoft.public.word.docmanagement
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously

If you have the appropriate filter installed, Word will open Works documents
without problem. You can download the older Works filters from my web site.
The latest filter is supplied with Office 2007.

A sensible option would be open the Works files as you require them and save
them as Word 2007 documents, but it would be possible to convert them as a
batch process. The following macro will save all Works documents as Word
docx format from a given folder. The original Works documents are
unaffected, so you can return to the original if necessary.

Sub SaveWorksWPSAsDOCX()
Dim strFileName As String
Dim strDocName As String
Dim strPath As String
Dim sPrompt As Boolean
Dim oDoc As Document
Dim fDialog As FileDialog
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", , "List Folder Contents"
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
sPrompt = Options.ConfirmConversions
Options.ConfirmConversions = False
If Left(strPath, 1) = Chr(34) Then
strPath = Mid(strPath, 2, Len(strPath) - 2)
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 & ".docx"
oDoc.SaveAs FileName:=strDocName, _
FileFormat:=wdFormatDocumentDefault
oDoc.Close SaveChanges:=wdDoNotSaveChanges
strFileName = Dir$()
Wend
Options.ConfirmConversions = sPrompt
End Sub
http://www.gmayor.com/installing_macro.htm



Jeffrey L. Hook wrote:
I'd like to convert 20K existing Works 7.0's "word processing"
files to Word 2007 simultaneously or at least automatically and
consecutively. I've not been able to find any guidance about how to
do this either in Word 2007's Web-based Help directory or by
searching in Google Web. (The Word 2007 Help directory does offer a
Web-based view of the "community" which seems to include all relevant
news groups/forums.) Word 2007's Help texts provide excellent
assistance but they only seem to discuss conversion of single files,
"one at a time," or "one by one." The Help texts don't seem to
discuss automatic conversion of *ALL* files of particular types.

I suspect Word 2007 itself may not be able to make "mass conversions"
of files from other applications. I suspect this may require an
"add-in" or other types of separate software. I've seen some
discussion of Aspose.Word, for example, but that seems to be a
large-scale application which is intended for enterprise use.

I'm surprised that I've not yet found any instructions about how to
convert *ALL* files of particular types. I have seen some advice
that Word 2007's built-in converters obviate actual conversions of
files from other applications, but, as I explain in the optional text
below my signature, I've "had it" with Works' "so-called" word
processor, I've not been able to rely on it, and I don't want to use
it any more, so I'd prefer to convert all of my files from that
application to Word 2007.

Thanks in advance for any assistance!

Additional details are provided below my signature.

Jeff Hook, NJ, USA

I'm working at home on a non-networked system which is running the
Home Edition of Windows XP. I made the mistake of relying on Works'
"so-called word processor" when I wasn't able to operate Word years
ago as a novice computer user and I compounded my error by continuing
to use Works almost exclusively for ten years. I began with version
4.0 and I've used 7.0 since 2003 when I acquired it as an OEM
installation. It was bundled with the Home Edition of Windows XP on
a new Gateway system unit. Works 7.0 was an upgrade from Works 6.0
which I'd used with Windows 98se on a prior system unit. I'd been
losing the contents of Works 6.0's Custom Dictionary regularly but
6.0 itself never crashed. (I was able to replace the dictionary's
contents from a back-up TXT file.)

Works 7.0 crashed when it was in its pristine state within an hour or
two of my first using it on the new Gateway system unit. I may later
have "tainted" Works 7.0 by using TweakUI incorrectly, in an attempt
to bypass the Works "Task Launcher." (I installed my own
standard-formatted "sample" Works "document" in the Windows Explorer
File\New menu. This allowed me to create and to save new files at
the ends of long file paths while I worked in the Windows Classic
View in Windows Explorer. The Task Launcher saved all of its new
files to the root of the My Documents folder, and it would have been
necessary to "re-navigate" from there to the desired destination
folder for each new file.)

I abandoned the File\New menu when I created a large directory of
differently-formatted "template" files. From that point forward I
created each of my new Works 7.0 documents as a copy of one of my
many templates and I gradually included entire small sub-directories
of folders and files in my templates directory. I now often fill in
new file paths by pasting copies of sub-directory templates to them.
I subsequently reformatted my hard drive and I made no further use of
TweakUI or of the File\New menu for the creation of new Works 7.0
documents, but the application continued to crash, although much less
often.

I've finally made the switch to a "real" word processor and, as a
result of my bad experience with Works "word processor," I now want
to convert *ALL* of the files which I've accumulated in that
application to Word 2007. I don't work collaboratively with anyone
else and, if I ever need to share a document with someone who's not
running Word 2007, I can save a copy in RTF, so I'm hoping to be rid
of Works' "word processor" once and for all.

I've created a macro which automates the use of the Convert command
in the Word 2007 Office menu. (Word 2007 Help doesn't even mention
the "Office\Convert" option in its guidance about how to convert Works
documents. It only discusses the "Office\Save As\Works Document"
approach, which seems to be inferior. The "Convert" option seems to
operate well and it also deletes the original Works file, which is a
convenience because it eliminates confusion about whether files have
been converted or not.)

I'm using Steve Vest's FileLocator Pro for desktop searching. By
running .\.wps as a "regular expression" in any folder of my data
directory I can obtain a list of all of the Works "word processing"
files in that path, and I can then work my way down the engine's list
of files, opening each in Word 2007 by using its context menu in the
search engine's GUI, and then hitting my macro on the Word 2007 Quick
Access Toolbar when the Works file opens in Word 2007. The
"Convert-Save-Close" macro seems to do all that I require, and each
conversion only requires a few seconds but conversion of all files
individually seems nuts when it must be possible to do this
automatically, for all 20K+ files!

JLH