August 25th, 2004 • 4:42 am
This is exactly the kind of stuff that’s so infuriating about Microsoft. They finally introduce support for a long-awaited feature, such as long file names in Office 2004 — and in the process they manage to introduce new bugs that break the stuff that was working fine until now.
For many years now, I have been using the following macro command:
Sub autoOpen() myName = ActiveDocument.Name If ActiveDocument.PrintFractionalWidths = False Then ActiveDocument.PrintFractionalWidths = True End If setZoomTo175 Windows(myName).Width = 900 Windows(myName).Height = 950 Options.AutoFormatAsYouTypeReplaceQuotes = False End Sub
It’s a macro command that takes the name of the current document window, turns the “Fractional Widths” option on if it is not already on, changes the window’s zoom setting to 175% (using another subroutine), and then resizes the document window to 900×950 pixels, and turns off smart quotes (because I use Spell Catcher X for this).
Because the macro command is called
autoOpen, it is a command that will be run automatically every time I open a document.
Prior to Word 2004, it had always worked fine, except for read-only documents. Then I installed Word 2004 and all of a sudden, I started getting error messages — not for every document I was opening, but often enough.
It didn’t take me long to figure out that the documents that were causing an error message were documents whose file name contained a non-ASCII character such as an accented “é” (very common in French, of course).
And it doesn’t take a Ph.D. in computer science to figure out that the bug is probably due to the introduction of support for long file names (longer than 31 characters, that is) in Word 2004. The VisualBasic component of Word 2004 was probably not properly updated to fully support the new file names. Indeed, when I click on the “Debug” button in the error alert that I get, it highlights the line:
Windows(myName).Width = 900
in my macro command, which is the first line of code that actually tries to use the value of the
Of course, Microsoft, being the US-centric company that it is, probably didn’t even bother to properly test Word 2004 and its VisualBasic language with file names containing non-ASCII characters.
I guess I am going to have to try and find a new work-around now. Grrr…