A macro to fix empty boxes and wrong symbols in imported WP files

E

Edward Mendelson

At the end of this message is a link to a macro that tries to fix the
problem of Word files that have been imported from WordPerfect, and display
either the wrong symbols or letters instead of symbols such as quotation
marks and dashes. The intelligent parts of the macro are the work of Jay
Freedman, Helmut Weber, Greg Maxey, and Jezebel, in answers to my pleas for
help here; the candy-coating and blinking lights are by me.

This macro is designed to fix the problem in which a typical symptom is
this:

In a file originally created in WP, the creator of the file included:

"quotation marks--and a dash"

but when the file is opened in a copy of Word (usually on another system),
Word displays this:

Aquotation marksCand a dash@

I think I finally have this macro in a condition that's suitable for
testing, but ONLY on copies documents that you can afford to lose. The macro
saves your file in Word for Windows 2.0 format and then reopens it. Word
2003 does not ship with the Word for Windows 2.0 converter, but you can take
a copy of WNWRD232.CNV from a system with Word 2002 and move it to
C:\Program Files\Common Files\Microsoft Shared\TEXTCONV or wherever your
text converters happen to be, and then restart Word (maybe restart Windows)
to be able to use the WinWord 2.0 converter in Word 2003.

As written, the macro converts only a limited number of characters, because
each one has to be added to the macro by hand.

Also, it turns out that symbols like the musical flat, sharp, and natural
will convert in Word 2003 under Windows XP, but not under Word 2002 under
Windows 98 SE. I *think* this is caused by differences in fonts in different
versions, and I would like to add a test for the Windows version. Is there a
very simple way of returning the current Windows version? The ones that I've
seen out there seem extremely complicated.

Here's the code. If your browser renames it with a .TXT extension, remove
that; go into Word, click Alt-F11, go to the Properties inspector at the
upper left, click on Normal, use Insert/Module to insert the module. Open a
WP file with the problem I described (MAKE A BACKUP EVEN THOUGH THE MACRO
MAKES ONE FOR YOU). Run the macro FixSymbolsInImportedWPFiles0012.

http://www.columbia.edu/~em36/FixSymWP0012.bas

Helmut, I've left the language treatment complicated, because I *think* you
implied that the act of saving and reopening the file sets the "symbol"
string to the local language, but I may be wrong.

Thanks for any suggestions about the inevitable stupidities and bugs and
foolishnesses in this code.

Edward Mendelson
 

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