Word 2004: Solution for erroneous alerts when opening existing files

Posted by Pierre Igot in: Macintosh
June 4th, 2004 • 4:35 am

Yesterday, I reported on a problem I was experiencing with erroneous alert messages appearing each time I tried to open existing Word documents (i.e. documents created with Word X) in Word 2004.

Further investigation with Microsoft reveals what the source of the problem is and how to solve it.

When you open an existing document in Word, Word actually opens two things: the document itself, and the document template that it is based on — if it can find it. If I understand correctly, the reason it opens the template that the document is based on is because this template might contain customizations (AutoText entries, macro commands, keyboard shortcuts) that would be required by the user to further edit the document.

This only works, obviously, if the template is accessible. If, for example, the Word document in question has been created on someone else’s machine, Word will not find the template used to create the document on your machine, and will simply open the document by itself, without all the customizations that came with the document template. If you want to know the exact path of the template that your Word document is linked to, you need to go to the “Tools” menu and choose the “Templates and Add-ins…” command.

If the document was created based on the “Normal” template (as most documents are), the “Document template” field in that dialog will simply contain “Normal”, and opening the document will not open any other template at the same time. Word will assume that the document is based on your “Normal” template, even if it was created on someone else’s machine using their “Normal” template.

If the document was created based on another template, then the “Document template” field will contain the full path to the template on the volume where it was created.

In my situation, the problem is that I chose to leave my existing Word X templates in their existing folder, and to create new templates from scratch for Word 2004, in another location (by pointing the “User templates” setting in the “File locations” section in “Preferences” to a new folder where these templates are stored).

So when I tried to open in Word 2004 an existing document based on an existing Word X template, Word 2004 would attempt to open the document and the Word X template. Since the Word X template still existed in the expected location, it was able to find it. But since this location was not my normal folder of templates, i.e. the one defined in the “User templates” setting, Word 2004 deemed this to be an unsafe thing to do, and gave me the erroneous alert instead.

The solution, provided to me by Microsoft’s Rick Schaut, was to use the “Workgroup templates” setting in the “File locations” section in “Preferences” and change it to my Word X templates folder. This amounts to “blessing” that other folder of templates, which are not recognized and accepted as such by Word 2004. And it no longer gives me the erroneous alert.

Of course, there are still plenty of problems with all this. First of all, the erroneous alerts are totally misleading. They lead you to think that it is the document itself that contains macros or other potentially “dangerous” customizations, when it simply isn’t true. And they also put both macros and other forms of customization (keyboard shortcuts, AutoText entries, even styles!) in the same bag — all considered a potential security threat. In this particular case, my Word X templates did not contain any macros. But they did indeed contain specific styles, and keyboard shortcuts for these styles, and AutoText entries.

All these are considered potentially dangerous — even though there isn’t, as far as I know, a single documented case of a Word virus spread through a style definition or AutoText entry. But apparently Microsoft feels that it’s better to use an overkill approach that considers any kind of customization a potential security breach.

Then there is the question of the Word architecture itself. The very fact that opening a document also opens, unbeknownst to the user, the document template on which the document is based is highly problematic. It occurs behind the user’s back, and it only works if the template can be found using the path included in the “Document template” field, i.e. a hard-wired file path rather than a flexible link to a file that would be preserved even if the template were moved or renamed (like Mac OS X’s aliases work).

I understand the rationale behind this. When a document is created based on a user-defined template, the customizations contained in that template can be used while editing the document, even though they are not actually saved in the document. In fact, some of them are: when you create a new document based on a template, all the styles included in the template are copied and included in the document. But the keyboard shortcuts that might come with these styles are not. And the AutoText entries in the template are not. In other words, if you send the document to someone else, that other person will still be able to use the document’s styles, but not the keyboard shortcuts and the AutoText entries.

In Word’s parlance, there are customizations and then there are customizations. Macros, styles, keyboard shortcuts, toolbars, and AutoText entries are all customizations. But some of them can only exist in a template, while others can exist both in a template and in a document. To verify this, you can use the “Organizer” command in Word. (It’s not part of the default Word interface. You have to add it through the “Customize” command.) This command opens a dialog box with four panes: Styles, AutoText, Toolbars, and Macro Project Items (a.k.a. macros). If you fool around in this dialog box, you’ll see that a Word document can contain styles, toolbars, and macros. What this dialog doesn’t tell you is that it can also contain keyboard shorcuts. The only thing it cannot contain is AutoText entries, which can only be included in a template.

In other words, it’s a complete mess :). And in order to try and keep this mess under control, Microsoft has implemented security features that are both overkill and poorly explained. Hence my problem with the erroneous alert boxes.

Comments are closed.

Leave a Reply

Comments are closed.