How To Convert Thousands of Works 7.0 Files to Word 2007 Simultaneously

J

Jeffrey L. Hook

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
 
J

Jeffrey L. Hook

I referred to "Steve Vest" in my previous message. The developer of the
FileLocator Pro desktop search engine is *DAVE* Vest. (Sorry, Dave!)

http://www.mythicsoft.com/Page.aspx?type=filelocatorpro&page=home

Jeff Hook

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

Graham Mayor

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
 
J

Jeffrey L. Hook

**EXCELLENT**, Graham! THANKS!

1. > If you have the appropriate filter installed, Word will open Works
documents without problem.

Yes, I can do that easily. I can open every one of the > 20K Works 7.0
documents in Word 2007 instantly. That's never been a problem.

2. > A sensible option would be open the Works files as you require them
and save them as Word 2007 documents...

I can also do that, but, as I explained, I've had such difficulty with Works
7.0's "word processor" that I want to be rid of the application and I'd
rather convert all of its existing files to Word 2007 now, so I can avoid
future use of the Works application. (I do appreciate Works' flat-file
database.)

Some users who find this thread in the future may wish to know how they can
find and then convert all files of a type. I'll explain several methods
below my signature.

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

Thanks very much for the code. Please understand that my knowledge of
macros in Word 2007 and of Visual Basic is just about nil. The simple
"Convert-Save-Close" macro which I mentioned in my first message was my
first macro. (This functionality isn't "supported" by Works' "word
processor" so I had no prior experience of macros.)

Here's the entirety of my first macro, from the Visual Basic GUI:

***
Sub Macro3()
'
' Macro3
' Automates the steps of the Conversion process within a Works 7.0 "word
processing" file which has already been opened in Word 2007.
'
ActiveDocument.Convert
ActiveDocument.Save
ActiveWindow.Close
End Sub

***

That's all there is, but it seems to work.

I was able to install your macro. I could see from the code that the macro
seemed to be focused on folders, and that seemed appropriate, because I
hoped it would start at the "highest" folder in a given file path (closest
to the root) and would "work its way to the end of the path." I assigned a
Quick Access Toolbar button to the macro and I then ran it, on a
"low-stakes" folder of content which I rarely use. (I should have copied a
folder and run the macro on the copy, in case I bungled the installation and
problems resulted, but I guess I could restore content from a back-up of my
data directory if that were necessary.)

I see that your macro displays a typical Windows browse-type dialog which is
titled "Select folder and click OK." I assumed I should use the dialog's
browse capability to navigate to a folder in which I wish to convert Works
documents and I assumed I should then left-click the dialog's "OK" button.
The dialog doesn't offer any display of content (i.e. of files in folders)
unlike the Word 2007 "Open" dialog, which can be set to show "All Files
(*.*)" in its "Files of type" field. Also, if I select a folder and then
click "OK" the folder name doesn't appear in the macro's "Folder name"
field, which remains empty, although I see that the field's drop-down list
shows all folders in which I've used this macro, in reverse chronological
order. These folders are only shown *after* the macro's been run in them.

I'm "operating blind" with this macro because I can't see if any folder
contains any files which I wish to convert. I could navigate simultaneously
in Windows Explorer in order to locate Works 7.0 documents which I wish to
convert while I also perform the same navigation in your macro, but I don't
want to *double* my navigation! It's easier simply to open any Word 2007
file and then to navigate in that file's Open dialog via the file's Office
menu, with the Open dialogue set to Files of all types, so I can see the
contents of all folders but it's even easier than *that* for me to use my
desktop search engine (Dave Vest's FileLocator Pro) in order to obtain a
list of *ALL* Works 7.0 documents in any directory. That completely
eliminates all navigation! As I explained in my first message I can reduce
the amount of time which is required for each conversion to a few seconds by
combining my desktop search engine with my own "quick and dirty" macro, but
I still feel like it's a waste of time to convert files "one at a time" like
this, even if each conversion only requires seconds. I'm looking for a way
to automate the conversion of more than 20,000 files and to perform those
conversions in as little time as possible.

Your macro seems to operate only in one folder (at one "level" of a
hierarchy) at a time. It doesn't seem to "drill down" along file paths and
to work in all sub-folders. When I could see in its code that it was
focused on folders I decided to operate it close to the end of a rarely-used
file path in order to reduce the chance that it might do damage if I'd
installed it incorrectly and if I'd "corrupted" it. I operated it a few
levels above the end of the test path in the hope that it would convert all
files in all sub-folders, but it never left the folder in which it was first
operated. It therefore doesn't operate in the way which I desired. It also
retains the original Works 7.0 files although I'd prefer to use Word 2007's
"Convert" option, which deletes the original files, and which leaves only
the newly-converted Word 2007 files.

Are you at all inclined to modifiy the code in order to assure that the
macro will:

1. move along complete file paths, working in all sub-folders and will

2. convert all Works documents in all folders, deleting the original files,
and leaving only the newly-converted Word 2007 files, as results from the
use of Word 2007's "Office\Convert" menu?

Would you be willing to explain how your code limits this macro's function
in these respects, so I could try to modify the code myself? I tried to
change "False" to "True" in this context:

....With fDialog
.Title = "Select folder and click OK"
.AllowMultiSelect = True...

but that didn't produce the sub-folder effect which I'd hoped to produce.


Jeff Hook, NJ, USA (Additional comments below may be of interest to users
who wonder how to locate and convert files of any type.)

I've used these different methods to locate Works 7.0 files and to convert
them to Word 2007. I've written an extremely simple macro in Word 2007
which merely automates the four-click process of opening each file's Office
menu when the Works file is opened in Word 2007, left-clicking the "Convert"
command in the Office menu, left-clicking the "Save" button on the Quick
Access Toolbar, and then left-clicking the Windows "Close" button at the
upper-right corner of each file's GUI. I installed my macro as a button on
the Quick Access Toolbar so it appears in each file when each file is opened
in Word 2007. Conversion is therefore a simple matter of opening each file
in Word 2007 and then making a single left-click on the macro's button. The
macro does the rest:

A. I can open each Works 7.0 file individually in Word 2007 by
right-clicking the file in the Contents Pane of Windows Explorer in the
Windows Classic View in Windows XP, then left-clicking "Open With\Microsoft
Office Word" in the context/"pop-up" menu.

B. From within any Word 2007 file, I can use the Word 2007 Open command in
the Office menu. This produces the Open dialog, in which I can navigate to
the desired Works 7.0 files, which I'll be able to see in the dialog's
Browse display if I've set the dialog's "Files of type" field to "All Files
(*.*)" in the field's drop-down list.

If I leave any Word 2007 file open after I've navigated to my first Works
7.0 file and have converted that file to Word 2007 the Open dialog will
remain "set" to the last folder in which I worked. This helps me to
navigate through directories in order to convert multiple files one-by-one.
If I close all Word 2007 files, it'll be necessary to "re-set" the "Open"
dialog from the system root, by navigating once again to the desired
folders.

C. A convenient way of converting all files systematically (but still only
one-by-one) is to use a desktop search engine to obtain a list of all files
of a given type in a given directory, as I explained in my first message. I
can then convert each file in the search engine's "search results" list, by
using each file's context menu, as I explained here in method "A" above.
This method's helpful because it obviates navigating through the directory
in search of the files which are to be converted; the engine lists them all
and it's not necessary to look for them.

JLH

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. (snipped)
 
G

Graham Mayor

The macro is simply a generic batch processing function that works at an
individual folder level, using built-in dialogs to enable the user to select
the folder. It opens each file in the folder that matches the search string
(here *.wps) and saves those documents as Word docx format.
It has no ability to search across a range of folders.

Because only you know what files you have on your hard drive and the lack of
error trapping in the macro, it is not a good idea to include code to delete
the wps files. It would be a simple job to search for them later with
Windows Explorer and delete them, when you are sure that they have all been
converted. However if you really want to take that approach change the
section from While ... to ... Wend with

While Len(strFileName) <> 0
Set oDoc = Documents.Open(strPath & strFileName)
oDoc.Convert
oDoc.Close SaveChanges:=wdSaveChanges
strFileName = Dir$()
Wend

This will convert the documents and delete the originals in the process.

I don't have the code to hand to iterate through all the possible sub
folders, but if you wish to pursue this, then ask in the Word vba
programming forum.


--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jeffrey L. Hook

Thanks for your reply, Graham.

I was never a fan of Kurt Vonnegut. His writing seemed to me to be a type
of literary slapstick which was too clownish for my taste. I read his novel
"Cat's Cradle" many years ago and I remembered the concept of "Ice Nine."
This was a modified form of water which melted at 114 degrees Fahrenheit.
"Ice Nine" had a "contagious" effect so that the exposure of any amount of
it to any water in the natural environment anywhere would begin an
irreversible "chain reaction" which would quickly freeze all water around
the entire world. The idea was ridiculous but it did impress itself on me
as an example of an automatic process which produced undesirable results:

http://www.google.com/search?hl=en&num=100&q="ice+nine"+"cat's+cradle"+"kurt+vonnegut"&btnG=Search

I was looking for an automatic conversion process which could have been
started at the root of my data directory and which would have then worked
down, or out, or up, or whatever the direction would be. I wondered if I'd
"trip" a type of "Ice Nine" "chain reaction" if I began to run such a
process.

You also seem to be leery of unintended results but I'm only talking about
conversion of data files from one application to another. I don't think an
automatic conversion process could create a disaster. I routinely back up
all of my files and I could create a back up immediately before I began an
automated conversion of all Works documents in my data directory. If the
process went awry I could replace the data directory with the back up copy.

So far, my best method seems to be to use my desktop search engine (Dave
Vest's "FileLocator Pro") to obtain a list of all Works 7.0 documents in my
entire data directory or in any sub-directory. FileLocator Pro will list
all such files from any folder in which I run it along all paths, in all
sub-folders. I'll then be able to open each file in each of the the search
engine's "search results list," one-by-one, by using each file's own context
menu. I can then use my own simple macro in each file to convert, save, and
close each file with a single mouse click. My macro uses the
"Office\Convert" method, rather than the "Office\Save As\Word Document"
method. The "Convert" method deletes the original Works file and only
leaves the converted Word 2007 file.

I can chip away at my backlog of Works 7.0 documents by using my method but
I continue to think that, "Ice Nine" scenarios notwithstanding, the
automatic conversion of many files of the same type from one application to
another must be routine at the enterprise level. I assume this is done in
large international organizations, for example, with hundreds of thousands
or even millions of files. I'm a single home user who doesn't even have a
home network. I'm only using a single system unit with two internal hard
drives and four partitions, one of which is my "boot" partition and another
of which is my "active data" partition but Word 2007 does seem to be
designed for enterprise use, and I remain surprised that I haven't yet been
able to find instructions about how to convert all of my Works 7.0 documents
to Word 2007 "at the flip of a switch." Maybe Microsoft was also worried
about unintended consequences of powerful automatic processes.

I assume that "batch conversion" may be the jargon which IT professionals
use to refer to the type of process which I'm seeking.

Thanks again, Graham.

Jeff Hook, NJ, USA

The macro is simply a generic batch processing function that works at an
individual folder level, using built-in dialogs to enable the user to select
the folder. It opens each file in the folder that matches the search string
(here *.wps) and saves those documents as Word docx format.
It has no ability to search across a range of folders. (snipped)
 
G

Graham Mayor

If you use the search function to find all the wps files Explorer will
display the foldernames that contain them. The revised version of the macro
can then be used to process each named folder in turn and will indeed
*convert* all the files in that folder. What it won't do is iterate through
all the folders on your hard drive.

A batch process is a process that runs on a group or batch of files. The
macros I posted will run on a batch comprising all the files in a single
folder. I regret I do not have a function to hand that works on the complete
folder structure (though I will look into it).

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jeffrey L. Hook

Graham:

Thanks for your continued interest and for your contribution of code.

I admit my near-complete ignorance of these topics. I also acknowledge
that you seem to know far more about all of this than I do. You're an
MVP and I'm a "noodnick"!

I'm grateful for your participation in this discussion. I don't want to
give any offense but I want to be sure that we keep these details in mind:

I wanted an automatic method by which I could convert > 20K WPS files
to DOCX "in one fell swoop" or at least in one continuous unattended
process, which might need to run for hours, etc.

I explained that I'd already reduced the time which is required for the
conversion of each file to *a few seconds* by using a desktop search engine
(Dave Vest's FileLocator Pro) in combination with my own crude
"Convert-Save-Close" macro. My method completely eliminates any manual
searching for WPS files; that's all done quickly and automatically by the
search engine, which then gives me a helpful list of all 20K + WPS files,
one after the other, all together in one place. I'm not required to look
for the files; they're all lined up neatly in one long list. I can open
each
of them from that list by using its context menu, and, once each file
opens in Word 2007, I can convert, save, and close the file with one mouse
click, by using my own crude macro. The original WPS files are deleted
because I'm using Word 2007's Office\Convert command.

My method seems to be quick, but it's not nearly quick enough. Each file
must be
opened manually, "one at a time" in the search engine's list, and I must
run my macro in each file by manually clicking the macro's control
button on each file's Quick Access Toolbar. This requires far too much time
for the conversion of so many files.

Your method also automates the conversion, saving, and closing of each
file, but it operates manually in all other respects.

Your macro doesn't automatically "aggregate" all WPS files, as the
FileLocator Pro search
engine does. Your macro requires me either to locate all WPS files myself
("manually" or "visually" in Windows Explorer, which is both time-consuming
and inaccurate because it's so disorienting to try to coordinate Windows
Explorer with your macro's navigational display) or else your macro must be
run in every one of the > 52K folders of my data directory, "as a
precaution," in *case* each folder contains one or more WPS files, because
your macro's display interface only displays folders; it doesn't show any
files of any types! I've explained that I'm using a method which gives me a
convenient list of WPS files. The search engine's list completely obviates
all searching for the files (that's done automatically by the engine) and it
gives me direct access to the files, but, in response to my inquiry about a
better, fully automatic method, you've suggested a method which doesn't
display any files of any type and which might require me to "rummage around
blindly" from folder to folder, navigating my system manually without being
able to see any contents of any folders. How does this help, and how is
this superior to my own method?

You've now suggested that I could navigate in Windows Explorer to the
folders which had been identified in the search engine's list as containing
WPS files, so I could run your macro in those folders! Why would I want to
do that when the very files are already directly in front of me in the
search
engine's list?! Yes, it's possible that some folders might contain large
enough numbers of WPS files so that the substantial additional amount of
time which
would be necessary to leave the files behind in the list, to navigate to the
relevant folders wherever they might be in my far-flung, sprawling data
directory, to run your macro there, and then to return to the search
engine's list *might* be less than the total time which would be necessary
to "bang away" in the list itself, spending a couple seconds converting each
file in succession, individually, but that's extremely unlikely. My file
paths are long, my data directory is complex, and few of my folders contain
large enough numbers of WPS files to make this "detour" worthwhile. Your
suggestion seems likely to take far more time than would be necessary simply
to keep moving through the search engine's list, one file at a time.

It's worth stressing that I'm NOT using Windows XP Home's own awful "Search
Companion." I'm using a shareware desktop search engine, which I obtained
from an independent developer. It's also relevant that this engine,
FileLocator Pro, effectively "extracts" all WPS files from wherever they may
be, it displays them in a convenient list, and allows me to open each file
from its own context menu in the list. The last file which I opened in that
list remains selected when I return to the list in order to open and to
convert the next file, so I don't "lose my place" in the list. This helps
me to move along as quickly as possible even though a fully-automatic method
would clearly be far superior.

I'm glad that you're investigating how to enable your conversion macro to
move through all folders in a directory. Please notice that FileLocator Pro
seems to do this when
it finds all of the WPS files in any directory.

You previously suggested I might consider converting WPS files on an "as
needed" basis or whenever I encounter them in Windows Explorer during my
normal navigation of my data directory. That may be the the most practical
idea, although I'd prefer to complete the conversion of all of the files at
the same time. I can open individual WPS files in Word 2007 easily by using
their own context menus in Windows Explorer's Contents Pane, and I can then
complete the conversions of those files with one mouse click on their Quick
Access Toolbars when the files open in Word 2007.

I can't say this with any "pride of authorship" because I'm only bumbling
along in all of this, but my own half-baked method seems to be best until I
can find a true "turn-key," fully-automatic alternative. I remain confident
that such methods are used constantly at the enterprise level.

Jeff Hook, NJ, USA




If you use the search function to find all the wps files Explorer will
display the foldernames that contain them. The revised version of the macro
can then be used to process each named folder in turn and will indeed
*convert* all the files in that folder. What it won't do is iterate through
all the folders on your hard drive.

A batch process is a process that runs on a group or batch of files. The
macros I posted will run on a batch comprising all the files in a single
folder. I regret I do not have a function to hand that works on the complete
folder structure (though I will look into it). (snipped)
 
G

Graham Mayor

The advantage of the macro I posted, over yours, was that mine runs on a
complete folder, whereas yours runs on a single file. If your files are not
scattered haphazardly over the hard drive, then the documents will be in a
limited number of places which should be easy to identify.

Unfortunately what you propose is not quite as simple to execute as you
imagine. However true to my word, I have investigated further and I have
located a procedure which I believe will do what you propose. As it is
somewhat complex, I have decided not to post the code here, but have
incorporated it as an add-in for Word 2007. You can download it from my web
site via the following link.
http://www.gmayor.com/Extras/WorksConverter.dotm

Save to the Word startup folder as defined at Word Options > Advanced > File
locations > Startup (by default - C:\Documents and
Settings\%username%\Application Data\Microsoft\Word\STARTUP) and it will
load with Word

When loaded it puts a button on the Developer Tab of the ribbon (Convert
Works WPS format). If the developer tab is not displayed add it from Word
Options > Popular.

I have tested it with a limited number of wps files and it will convert them
to docx in the manner already discussed. It will also access the sub folders
under the folder you select from the initial dialog when the macro is run.
However, searching for 20k files across a complete hard drive is uncharted
waters and not something I have been able to test. However you may set the
folder to search from as the root of the drive and it will search the whole
drive.

While running, it may blank the Word screen, and when run on a large drive
it will take some time to find the files in question, let alone process
them. When finished it will return to the Word screen, with no document
open, at the Home tab.

I offer the add-in 'as seen' and accept no responsibility for any problems
that you may encounter when running it.

Fellow MVP Greg Maxey has a different function available on his web site -
http://gregmaxey.mvps.org/Process_Batch_Folder.htm which has a 'User
Defined' process option that could be modified to convert the files, should
you wish to investigate another approach.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jeffrey L. Hook

Once again, Graham, thank you very much for your attention to this topic!
(I'm sure many other users will appreciate this also because, as I reported
at the start of this thread, I looked around extensively and I couldn't find
any instructions about how to achieve this result but I'm sure many users
wish to make such mass or batch conversions.) I should clarify that I
didn't think would be "simple to execute"! With *NO* abilities of my own in
this area at all, I don't regard *any* of this as simple!

I'll download the code from your site and I'll also check Greg Maxey's
user-defined batch code. This will help me learn about batch programs.

My data directory occupies its own partition of c. 32.25 GB on one of my two
internal hard drives but, as I explained, it's extensively branched, with
more than 52K folders and > 94K files.

I'll want to back up my entire data directory first and I'll then try your
code on a few sub-directories before I "let it rip" from the root.

Yes, I fully understand that I'll use this code at my own risk and without
any recourse to you. I'll let you know how this works out.

Jeff Hook, NJ, USA


The advantage of the macro I posted, over yours, was that mine runs on a
complete folder, whereas yours runs on a single file. If your files are not
scattered haphazardly over the hard drive, then the documents will be in a
limited number of places which should be easy to identify.

Unfortunately what you propose is not quite as simple to execute as you
imagine. However true to my word, I have investigated further and I have
located a procedure which I believe will do what you propose. As it is
somewhat complex, I have decided not to post the code here, but have
incorporated it as an add-in for Word 2007. You can download it from my web
site via the following link.
http://www.gmayor.com/Extras/WorksConverter.dotm

Save to the Word startup folder as defined at Word Options > Advanced > File
locations > Startup (by default - C:\Documents and
Settings\%username%\Application Data\Microsoft\Word\STARTUP) and it will
load with Word

When loaded it puts a button on the Developer Tab of the ribbon (Convert
Works WPS format). If the developer tab is not displayed add it from Word
Options > Popular.

I have tested it with a limited number of wps files and it will convert them
to docx in the manner already discussed. It will also access the sub folders
under the folder you select from the initial dialog when the macro is run.
However, searching for 20k files across a complete hard drive is uncharted
waters and not something I have been able to test. However you may set the
folder to search from as the root of the drive and it will search the whole
drive.

While running, it may blank the Word screen, and when run on a large drive
it will take some time to find the files in question, let alone process
them. When finished it will return to the Word screen, with no document
open, at the Home tab.

I offer the add-in 'as seen' and accept no responsibility for any problems
that you may encounter when running it.

Fellow MVP Greg Maxey has a different function available on his web site -
http://gregmaxey.mvps.org/Process_Batch_Folder.htm which has a 'User
Defined' process option that could be modified to convert the files, should
you wish to investigate another approach.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

I have found a minor bug in the add-in whilst testing, now fixed and updated
on the web site. It shouldn't affect the process, but I took the opportunity
to remove some superfluous code. It seems reliable even running it on my
full C drive of 200 gb without drama!

If it works for you, let me know and I'll post a permanent link on my web
site.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jeffrey L. Hook

Graham:

I'll comment about three topics in this message. I'll number them for your
reference in case you wish to scroll right through my typical "overkill"
from one topic to another:

1. THANKS UPON THANKS

I can't thank you enough for your sustained attention to this topic. Please
realize that I *greatly* appreciate your assistance. I see from your
comments on your home page that you're a Usenet "true believer" and I'm
therefore confident that you agree with me about the value of providing this
type of guidance for the use of *everyone* in the entire *global* community!
I'm sure that this one effort will help unseen users for years and this one
"transaction" is only one of many to which you've contributed. That's why
you were designated as an MVP in the first place and that's why you've
*remained* an MVP, one year at a time!

2. UNABLE TO OBTAIN CODE

I'm happy to see that you've altered the code since you first reported its
availability, because I've not yet been able to obtain it. I'll therefore
obtain the updated version when I finally succeed.

You can probably see from the differences in our respective local times that
I was up late last night. (I'm in the NYC area on the US east coast.) I'll
not be able to "dig in" to this effort immediately and I'll want to perform
system maintenance first, including a data directory back-up, which will
take some time, so I'll need to catch up with you later, but I thought I'd
let you know now what happens when I try to obtain the code. Let me say at
the outset that these problems *may* result from some "excess of caution" by
my browser, IE7, but I've *not* been shown any security warnings or other
explanations.

When I attempt to use this URL in your prior message:
...As it is somewhat complex, I have decided not to post the code here,
but have incorporated it as an add-in for Word 2007. You can download
it from my web site via the following link.
http://www.gmayor.com/Extras/WorksConverter.dotm ...


I'm shown the usual "File not found" error page:

+++
The page cannot be found
The page you are looking for might have been removed, had its name changed,
or is temporarily unavailable.
--------------------------------------------------------------------------------

Please try the following:

a.. Make sure that the Web site address displayed in the address bar of
your browser is spelled and formatted correctly.
b.. If you reached this page by clicking a link, contact the Web site
administrator to alert them that the link is incorrectly formatted.
c.. Click the Back button to try another link.
HTTP Error 404 - File or directory not found.
Internet Information Services (IIS)
+++

Notice I'm not told that access to the page has been blocked for security
reasons or for other purposes. The message seems only to suggest that the
desired content can't be found.

I select, copy, and paste your file name:

WorksConverter.dotm

into the Google Site Search data-entry field at your home page, and I'm
told:

+++

Your search - WorksConverter.dotm - did not match any documents.

+++

I remove the file extension from the file name, I try the search again, and
I'm taken to:

http://www.google.com/custom?hl=en&...nverter&btnG=Search&sitesearch=www.gmayor.com


where I'm told:

+++

No standard web pages containing all your search terms were found.

Your search - WorksConverter - did not match any documents.



+++

but I'm asked:

+++

Did you mean: Works Converter


+++

(Note the space which has been included between the two words.) I exploit
that hyperlinked Google Search suggestion and I'm taken to:

http://www.google.com/custom?hl=en&...um=0&ct=result&cd=1&q=Works+Converter&spell=1

where I'm shown:

+++

a.. Downloadable files
Add filters for a variety of applications. WordStar (for DOS)
converter for Word - 117kb. Works converters for Word - 186kb ...
www.gmayor.com/downloads.htm - Similar pages

a.. What's New?
Added the Microsoft Works and Word Perfect text converters to the
downloads page and a couple of extra new house photos. Some changes to the
layout of the ...
www.gmayor.com/Whats_New.htm - Similar pages

a.. Copy Vinyl or Tape Recordings to CDR
... signal to the sound card on the PC and its analogue to digital
converter. ... The Shure cartridge works fine in the SME arm and the arm
works well with ...
www.gmayor.com/copy_vinyl_to_CDR.htm - Similar pages

a.. Microsoft Word Tips
File converter dialog shows garbage when opening documents in Word
..... This is due to a bug in the Works add-in. This page explains how to
deal with it. ...
www.gmayor.com/Word_pages.htm - Similar pages


+++

I don't see the "Extras" page at your site which is named in the full file
path in the URL which you provided for the code but, on the Downloads page,
at:

http://www.gmayor.com/downloads.htm

I do see that this Works item is the last citation in the <File converter
downloads> list. That suggests this is the most recent offering and that it
*may* be the item you're referring to:

+++

Works converters for Word - 186kb

+++

I downloaded that item. It's a WinZip archive which includes:

+++

4 CNV files, modified on 6-20-02 and 6-16-03

1 REG file, modified on 11-17-04

1 Read Me TXT file, also modified on 11-17-04

+++

This is the complete text of the 187 byte Read Me file:

+++

Extract the cnv files to the folder
C:\Program Files\Common Files\Microsoft Shared\TextConv
and merge the reg file into the registry (right click in Windows Explorer
and select 'merge')

+++

The modification dates suggest that I've not obtained the Works converter
you offered to me. Am I correct?

3. BASIC MACRO QUESTIONS WHICH YOU *MAY* WISH TO ANSWER

I've admitted that I'm completely new to macros and to Visual Basic. I
don't claim to have any understanding of either topic. Your statement that
your new macro/add-in is "complex" gives me some pause, as does the
reference to the Registry in the above-mentioned Works converter, which may
or may not be the new item which you're offering for my use now.

I previously showed you the complete text of my own supposed
"Convert-Save-Close" macro. I'll include it again in this message, below.
It's the first functional macro I've ever created, in Word 2007 or in any
other application. I followed the Windows 2007 Help instructions about how
to "Record a Macro" but my initial efforts weren't successful; I didn't
record any code on my first attempt and my second macro wouldn't "run." I
used the Edit interface from the Macro menu on the Developer tool bar or
ribbon or tab or whatever it's called, and I could see that the code which
had been written for my failed second attempt included several lines which
seemed to refer to the "Save As" option. I didn't copy any of the Visual
Basic (?) text from the Edit interface, but I did take some screen shots of
it, and I extracted the Plain Text which I show below from one of those
images, by using OCR.

I ran through the process of opening, converting, saving, and then closing
four consecutive files from my desktop search engine's list of WPS files,
which began at the root of my data directory. I assumed I was "showing the
macro recorder" what I wanted the macro to do. I hoped the macro-recording
capability would function like a "keylogger," and I hoped this would allow
the macro to be able to repeat what I'd done, automatically, although I was
skeptical, because this seemed far too much to ask of such a simple
"program." I realized I'd not given the macro any instructions about how to
operate the desktop search engine, about how to obtain a list of all WPS in
a directory, about how to move through such a list, etc.

Nonetheless, I hoped the macro would be able to operate automatically, as
I've discussed with you. I hoped it would be able to "run through" the
search engine's list of WPS files, opening each file in succession,
converting each file from Works 7.0 to Word 2007, saving the file, closing
the file, returning to the search engine list for the next file, and
repeating the process until all of the files in the list had been converted,
so that's what I "demonstrated" for the macro, "manually." I'm sure it'll
amuse you that, in my absolute ignorance, I "demonstrated" this process for
the macro recorded four times, "just to be sure" that the recorder could see
what I'd done...

The code began this way, for the first of the four "demonstrations" of what
I wanted the macro to do:

+++

Sub Macro2()
'
' Macro2 Macro
' Automatically locates and then converts all extant Works "word processing"
files to Word 2007.
'
ActiveDocument.Convert
ActiveDocument.SaveAs FileName:= _
"(The full file path and file names of the four files which I
converted "for the benefit of the macro" were each indicated here, inside
this set of quotation marks, with one such entry of this type for each of
the four files, each with a DOCX extension.)"
FileFormat:=wdFormatXMLDocument, LockComments:=False,
Password:="", _
AddToRecentFiles:=True, WritePassword:="",
ReadOnlyRecommended:=False, _
EmbedTrueTypeFonts:=False, SaveNativePictureFormat:=False,
SaveFormsData _
:=False, SaveAsAOCELetter:=False
ActiveDocument.Save
ActiveWindow.Close
ActiveDocument.Convert
ActiveDocument.SaveAs FileName:=...


+++

That type of code was recorded for each of the four "demonstrations" and
then the code ended this way. (I've included the last two lines of the
fourth of the four "entries," plus the last line of code):

+++

...ActiveDocument.Save
ActiveWindow.Close
End Sub

+++

I never expected this would work, and I wasn't surprised when this code
"didn't run" when I tried to operate it via its new control button on the
Word 2007 Quick Access Toolbar of any WPS file which was opened in Word
2007.

I noticed the reference to the "Save As" dialog in the unsuccessful code. I
assumed that reference could be causing the macro to "fixate" on the
specific full file paths and file names of the four files which had already
been converted. I assumed that alone could disable the macro and I didn't
want to use the "Save As" option anyway; I wanted to use the "Convert"
option, then the "Save" option, rather than the "Save As" option. So, in my
blissfully ignorant way, I simply used basic word processing techniques to
select all code other than what *seemed* to be references to the desired
"controls," I deleted my selection, and I was left with this (which includes
my rewritten "description" in the apparent "Comment" code, at the start.
I'd assumed that the macro itself wouldn't be able to open and then convert,
save, and close an endless series of files in the search engine's list
automatically, as I'd hoped, I assumed it would be necessary for me to run
the macro "manually" from each file's Quick Access Toolbar once I'd
"manually opened" each file, and I re-wrote the "description" on the basis
of that assumption):

+++

Sub Macro3()
'
' Macro3
' Automates the steps of the Conversion process within a Works 7.0 "word
processing" file which has already been opened in Word 2007.
'
ActiveDocument.Convert
ActiveDocument.Save
ActiveWindow.Close
End Sub

+++

(I reported this code in this thread previously.) I nearly "fell off my
desk chair" when, to my great surprise, that puny little "macro" actually
WORKED!

I'm now wondering:

A. Is such "skimpy" code potentially problematical? It does *seem* to
achieve the desired results even if, as you pointed out, it must be operated
manually in each file, "one-by-one." It's not able to run automatically, as
I'd hoped it would. Am I "living in a fool's paradise" because I'm building
up greater and greater potential for future problem on some "future day of
reckoning" the more I use such "stripped-down" code? Did I remove critical
code from this "skeletal" macro?

B. If my minimal code is "OK," then is it possible to achieve more complex
results (such as the automatic operation which we've been discussing, in all
sub-folders of directories) with code which isn't much more complicated, or
do I demonstrate my "blissful ignorance" by asking such a stupid question?

My "real or imagined macro" does at least *seem* to be working, and, as I
say, it consists only of the apparent "operative" elements: the "controls"
themselves, or at least "coded references" to the controls. I'm not even
attempting to question your statement that your code is much more complex.
I assume that may indeed be required, but I'm wondering about the Registry
and about other "deep" features which might cause problems.

I stress my appreciation of all you've done so far and I'm not asking you to
answer these questions unless they interest you!

THANKS AGAIN, Graham!

Jeff Hook, NJ, USA



I have found a minor bug in the add-in whilst testing, now fixed and updated
on the web site. It shouldn't affect the process, but I took the opportunity
to remove some superfluous code. It seems reliable even running it on my
full C drive of 200 gb without drama!

If it works for you, let me know and I'll post a permanent link on my web
site. (snipped)
 
G

Graham Mayor

Jeffrey said:
Graham:

1. THANKS UPON THANKS

You are welcome
2. UNABLE TO OBTAIN CODE

As dotm files may be used to carry malicious code, I suspect it may have
been blocked by Windows security. I have compressed the file to zip format
and re-added it to the web site. I have checked this new link and it works
from here - http://www.gmayor.com/Zips/WorksConverter.zip.

Extract the file from the zip to the Word startup folder.

The zip file is NOT linked to my web site. The only link is that in this
message.
3. BASIC MACRO QUESTIONS WHICH YOU *MAY* WISH TO ANSWER

You are not a man of few words :)

The macro is complex in that it uses several functions in different modules,
that make providing an add-in a lot less effort than reproducing it in a
text message with explanations on how to apply it. The code is not protected
if you wish to open the template in Word and examine it. It is based on code
from

http://www.vbaexpress.com/kb/getarticle.php?kb_id=246
and
http://www.vbaexpress.com/kb/getarticle.php?kb_id=245

Simply click the button on the developer toolbar and select a start folder.
The macro will run from that start location, its sub folders and their sub
folders. Start with a sample folder low down the directory tree if you wish.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

The following was lost in the fog :)
I'm now wondering:

A. Is such "skimpy" code potentially problematical? It does *seem*
to achieve the desired results even if, as you pointed out, it must
be operated manually in each file, "one-by-one." It's not able to
run automatically, as I'd hoped it would. Am I "living in a fool's
paradise" because I'm building up greater and greater potential for
future problem on some "future day of reckoning" the more I use such
"stripped-down" code? Did I remove critical code from this
"skeletal" macro?

Your last effort is a perfectly viable macro. It provides a simple series of
functions which it achieves. That is all a macro is required to do - process
functions to save manual effort. The complexity arrives when the functions
you want to process are not so simple, when there are alternatives to
consider or potential errors to account for.
B. If my minimal code is "OK," then is it possible to achieve more
complex results (such as the automatic operation which we've been
discussing, in all sub-folders of directories) with code which isn't
much more complicated, or do I demonstrate my "blissful ignorance" by
asking such a stupid question?

The core of the code (your macro) is simple enough. My earlier macros
demonstrated how to process the current folder. It is the processing of all
the potential sub folders that is more complicated
My "real or imagined macro" does at least *seem* to be working, and,
as I say, it consists only of the apparent "operative" elements: the
"controls" themselves, or at least "coded references" to the
controls. I'm not even attempting to question your statement that
your code is much more complex. I assume that may indeed be required,
but I'm wondering about the Registry and about other "deep" features
which might cause problems.

The macros (yours and mine) do not write to the registry. It is possible to
write to the registry from a macro (there are examples on my web site) but
that is something to leave until you are more proficient with vba and the
potential consequences of what you are doing.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jeffrey L. Hook

Graham, "you are a gentleman and a scholar."

With respect to your accurate observation that
You are not a man of few words :)

and your wry comment that
The following was lost in the fog :)

I must thank you for stating the problem diplomatically. My intentions are
good, but my "unstinting" efforts are often pretty pathological. I may be
in the terminal stages of a case of acute obsessive-compulsive disorder. It
drives me to be sure that I've "covered" everything and the resulting
excessiveness so powerfully annoys most people that I'm all the more
appreciative of your willingness to "hang in here" and to stay with this
thread. Lesser men would have given up on this long ago. "Hey MVP
Certification Committee! Are you *reading* this? Has this guy EARNED a
'distinguished service' award, or *WHAT*?!"

Thanks for clarifying in your last message that your code wasn't linked to
your Web site. I could have provided far less information about my inability
to obtain the code, but I wanted you to have the texts of the error
messages, etc. You'll look around for something hard which you can throw
at my head when I say this, but it's almost "fun" to see how much I can
"pack in" to an unformatted Plain Text message by using "text dividers,"
like this:

+++


+++

by numbering and capitalizing "topic headings," and by moving some content
below my signature as "optional" text. (The below-the-signature-gambit may
be "the last resort of a scoundrel," to paraphrase Dr. Johnson.) These
tactics may preserve legibility, just barely, but, as you point out,
overloading messages does create "fog." It also provokes "extreme reader
resentment"...

I have obtained your code. I'm delighted that you not only created a tool
for my use (and, of course, for the use of hundreds of other "unseen" users
who'll benefit from your macro in the future) but that you explained the
code and that you also answered my questions so responsively and so
thoughtfully.

You've done all the work but I'm going to give myself some time off today.
I'll proceed anon as I explained previously.

Jeff Hook, NJ, USA



The following was lost in the fog :) (snipped)
 
J

Jeffrey L. Hook

Graham:

I've tested your macro.

The macro seemed to work well. Its icon button was displayed on the
Developer ribbon when the DOTM file was opened directly from within the
WinZip archive and I thought I could run the macro there if I could see it.
When I clicked the macro's button I was shown the "Browse" dialogue, I
selected the desired starting folder, and I clicked the "OK" button but the
macro wouldn't run until I'd extracted it to the Word\STARTUP system folder
which you identified.

I tested the macro on a "straight copy" of my entire data directory which
I'd pasted to an external USB2 hard drive on February 8th of this year.
(That content had simply been copied via the Windows Explorer Edit\Copy and
Edit\Paste menus from the data partition of one of the two internal hard
drives to the data backup partition of the external hard drive.) The USB
connection may have slowed the macro down but the speed seemed to be pretty
good. I assume the macro may operate more quickly in the current directory
on the internal hard drive.

The macro didn't blacken the screen. It seemed to close all Word 2007 files
which had been open when I ran it, asking me if I wished to save any unsaved
changes, and closing without comment files which had no unsaved changes. It
then operated "under cover of" the apparent "basic GUI" of the Word 2007
executable, the standard Word 2007 interface which was identified as
<Microsoft Word non-commercial use> on its Title Bar. Text along the bottom
of the Word GUI identified the files and indicated whether they were being
converted or saved. The macro did "drill down" along file paths, through
sub-directories.

The only problem resulted not from any defect of your code but from a larger
than expected number of old Works 4.0 files. I wonder if any macro could be
written to evade this problem. For each of those old files the conversion
process was stopped, an annoying sounder was played, and I was shown a
"Microsoft Office Word" "yellow triangle and black exclamation point"
security warning. I was told the file "needs to be opened by the Works 4.0
for Windows text converter, which may pose a security risk if the file you
are opening is a malicious file." It was necessary to left-click the
security warning's "OK" button to proceed for each file. These files popped
up persistently in the older sections of my directory. I wasn't given a
"Yes to all" option, so the repeated displays of this warning slowed the
batch coversion down and precluded the unattended automatic operation which
your code would otherwise have been able to complete. If I'd left the
system, hoping the conversion would have continued unattended until all
files were converted, I'd have returned to find that the entire process had
stopped as soon as the first of those old files was encountered.

I'd been seeing those same security warnings when I was "banging through"
lists of files which had been displayed by my desktop search engine. I may
be able to set the desktop engine to look only for WPS files which were
modified between dates which may be old enough to catch many of the old
files. I can then use my own method of opening those files in Word 2007 by
using their context menus directly in the search engine's list, and I can
use my own simple "one at a time" macro to convert, save, and close each
file from its Quick Access Toolbar in Word 2007. I can then return to the
search engine's list for the next file, etc.

Thanks again, Graham!

Jeff Hook, NJ, USA




....I have found a minor bug in the add-in whilst testing, now fixed and
updated
on the web site. It shouldn't affect the process, but I took the opportunity
to remove some superfluous code. It seems reliable even running it on my
full C drive of 200 gb without drama!

If it works for you, let me know and I'll post a permanent link on my web
site...
 
G

Graham Mayor

The security warning will occur for any old files that don't use the current
Works converter and is out of my control. Microsoft has identified what it
believes to be a potential security issue with the old converter and thus
prompts for each such document.

I have made a few minor modifications to the macro code concerned with
presentation (that won't affect the security issue) and posted it with
instructions to my web site -
http://www.gmayor.com/Works_Batch_Converter.htm

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
J

Jeffrey L. Hook

Graham:

I've just finished running your excellent code on my entire data directory.
Thanks to you, I've been able to convert all but 47 of those pesky WPS so
far. The DOCX count is now 23,985.

I think your code performed very well. If by changing the "presentation"
you mean that you added some progress/activity display, I think that would
be good. The lack of a clear display of what was happening was a little
disconcerting, but Task Manager's Performance tab showed high CPU-use and
its Applications tab did show names of files which were being processed.
The best source of information was the Recycle Bin. Because your code used
the Office\Convert converstion method, as I'd requested, rather than the
Office\Save As\Word Document method, the WPS files were all pitched in the
dust bin, as you might say, and it was actually fun to watch them accumulate
there. This also showed how your mighty macro was plowing through the
hierarchy. I indulged myself by trying to intercept it as it whizzed by.
By noting the file names on the Applications tab in Task Manager I could
expand some paths in the Folder pane of Windows Explorer in the Windows
Classic View, and it was fun to see the WPS files shift to DOCX, so to
speak, "as the train went by."

An added benefit of the pitching of WPS files into the Recycle Bin is the
option of sorting the bin's contents by date and time of deletion. This
allowed me to select all items which had been deleted, for example, at 3:08
AM, starting with the first item with that minute value, and ending with the
last items before 3:09 AM. I then deleted all selected files from the bin
by using the context menu of the selected files, and Windows asked me if I
wished to delete all XX items. Your "machine" ran at speeds of up to 75
conversions per minute in the light sections of my hierarchy.

I was able to use my desktop search engine to work around the annoying
security warnings for which no "Yes to all" response option was given. (I
agree that none of that aggravation is your doing.) I checked my records of
when I installed Works 6.0 as an upgrade of 4.5a and I found that, as I'd
suspected, the "Works 4.0" security warnings were also given for all 4.5a
files which hadn't previously been saved to 6.0 or 7.0 but they stopped as
soon as I'd installed Works 6.0 so that showed me the chronological cut-off
point for those warnings. There were 636 files which all produced the
warnings and I was forced to convert them all "semi-manually" and
individually using their context menus in the search list of my search
engine and then using my own "one-shot" macro on each file in Word 2007.

Once those truly annoying security warnings were out of its way your macro
ran beatifully but the major impediment to this process was my own
ignorance. The train metaphor seems to be good. I must admit "I left a lot
of debris on the track." It derailed your macro many times.

I'd been worrying about "propagating a taint" from Works to Word and I'd
actually planned only to retain converted WPS files temporarily, until I
could paste their converted contents to "clean, untainted" DOCX templates,
which hadn't been converted from WPS and which had been created exclusively
"from the keyboard" in Word 2007. I'd added a file-name suffix <-Delete> to
the names of the WPS files so that, when they were converted to DOCX I'd be
able to recognize them as possibly tainted, and as appropriate only as a
source of converted content. I'd dutifully used the Office\Save As\Word
Document conversion method which had been recommened by Word 2007's Help
directory for a while, and that had left the original WPS files behind, so
there were enough of these screwball situations that Word was hopelessly
confused when it attempted to convert those files; it found DOCX files with
the same name had already been created and that halted the process. I was
able to use my desktop engine to search for files by name and, when I found
both a WPS and DOCX file with the same name in the engine's search-results
list, I simply deleted the WPS parts of those "pairs" right in the engine's
list.

Another problem wasn't in any way caused by your code. I do think excellent
Help is provided on-line for Word 2007 but I'm not so happy about the
organization of the information. I've found myself often "dumped" at a
Table of Contents type Web page when I'm looking for guidance, as if I've
been led to the library door and told to look for myself. The conversion
process was many times interrupted by "serious problems" which crashed Word
when Word attempted to convert some old corrupted Works junk. This lead to
"recovery" of files and Word stubbornly insisted on showing me a lengthening
list of such files, which it seemed to be insisting should be "Saved As"
with new file names each time the conversion process was resumed. I admit I
didn't have the foggiest idea of what was happening, but I wasn't given good
guidance, and I didn't want to suspend this project while I invested a week
browsing around widely-scattered on-line Help texts.

I admit that I may have stressed Works' word processor by mistakes which I
may have made in my past use of several versions of the application, but I
also think Works is not as stable as it could be. I'm happy this is done at
last.

Thanks, Graham. I will be interested to check out your presentation of the
code at your site, but right now I'm finally going to turn in "for the
night" as dawn is breaking!

Jeff Hook, NJ, USA



The security warning will occur for any old files that don't use the current
Works converter and is out of my control. Microsoft has identified what it
believes to be a potential security issue with the old converter and thus
prompts for each such document.

I have made a few minor modifications to the macro code concerned with
presentation (that won't affect the security issue) and posted it with
instructions to my web site -
http://www.gmayor.com/Works_Batch_Converter.htm
 
G

Graham Mayor

I avoided the use of a progress indicator as this would have only slowed the
process further - and you would still be up watching it run ;) Glad you
found it useful.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 
G

Graham Mayor

It's probably a bit late to help you, but I believe I have resolved the
security warning issue. The revised version is on my web site.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top