If you have any problems with this web page, please first read my browser notesbrowser notes [link to ../../Miscellany/Browsers/Browsers.php] and if you still have issues, feel free to e-mail mee-mail me [link to e-mail the author at mailto:Tony@WordArticles.com]

Normal Template

Normal

How Word finds its Normal Template

Introduction

Is this the page for you?

Word is a complex application, and I tend to occupy its wilder shores. This monologue is about the file that is the Normal Template, about where and how to find it, about how you can control what it is called and where it lives, and about some of the weird and wonderful things that can happen. If you are interested in exploring some of the more obscure mechanics of Word, read on, but ...

This article is not about how Word uses its Normal Template, or what it keeps in it; it is not about how you can use your Normal Template to control the format of your documents, or to make editing of them easier. If you want more of that kind of end user-oriented information, I can recommend articles by Word MVPs Dian Chapman (Normal.dot Template — ExplainedNormal.dot Template — Explained [link to Dian’s article – “Normal.dot Template — Explained” – at http://pubs.logicalexpressions.com/pub0009/lpmarticle.asp?id=151]) and Suzanne Barnhill (How to change the default settings for Word documentsHow to change the default settings for Word documents [link to Suzanne’s article – “How to change the default settings for Word documents” – at http://word.mvps.org/faqs/customization/CustomizeNormalTemplate.htm]). It is also probable that there is some good information amongst the total disorganisation that is the Word Team BlogWord Team Blog [link to the Word Team Blog at http://blogs.office.com/b/microsoft-word/], but I don’t know how to find it.

Word works with Templates; it can’t do anything without Templates. Every Document has one, and Word, itself, has one. If you don't provide a Template it can use, Word will create one for you from a set of built-in defaults. Whatever the source of Word’s Template, however, it does belong to you: you use it however you see fit, to make Word work the way you want. Knowing something about it can only help you.

Before deciding to write this, I searched for other authors’ take on the subject – and found none that were even close to complete; there are a couple of Microsoft Knowledgebase articles on the location, and one blog post by Office System MVP Mourad Louhablog post by Office System MVP Mourad Louha [link to http://www.excel-ticker.com/use-own-filename-for-the-normal-dot-template-in-word/], but that was all I could find. I hope others will come to the subject in the future but, for the moment, this seems to be an almost unique page.

Whilst I have attempted to provide a complete picture, and written far more than I originally intended, there are so many possible different situations that I may have missed one or more circumstance that exhibits behaviour different from that which I have described. Do, please, let me knowlet me know [link to e-mail the author at mailto:Tony@WordArticles.com] if you know of any such, or if you think I have made any mistakes or missed out any important points.

This article refers to the registry in several places. As it seems to be de rigueur not to mention the registry without a concomitant warning of doom and destruction should you make a mistake, consider yourself so warned.

Templates and Documents

There are some esoteric file types that Word knows about, but for all practical purposes, Word works with Documents and Templates; these are superficially similarly constructed files, as is easy to see if you peek inside them. They are, however, different, and Word knows the difference and you can’t use a document as a template, or vice-versa.

Prior to Word 2007 it was not a requirement of Word that filenames had any particular suffixes, or extensions (the, traditionally, three, although now sometimes four, characters after the final dot in the filename), but it was usual for documents to be ".doc" files, and templates to be ".dot" files and many aspects of working with Word were built around the assumption that those extensions would be used. Whilst only the truly perverse would have a document called "MyDoc.dot" based on a template called "MyDot.doc", it was possible, but the document was still a document, and the template a template, and Word knew the difference and ignored the extension.

Word 2007, with its new file formats, has changed the picture slightly. It still works with Documents and Templates, but it has introduced the concept of Macro-Enabled Documents and Templates, and given extra significance to the filename extensions. The new extensions, which can only be used on files of the appropriate type are: ".docx" for ordinary Documents without macros or other ‘active’ content, ".docm" for Macro-enabled Documents, ".dotx" for ordinary Templates without macros, and ".dotm" for Macro-enabled Templates.

Internally, as well as the differences between Documents and Templates, there are, now, differences between Documents and Macro-Enabled Documents, and Templates and Macro-Enabled Templates. Word 2007 will not open, for example, a Macro-Enabled Document with a ".docx" extension, so it is not possible for a Document to be called "MyDocx.dotx", or its Template to be called "MyDotx.docx". A document is still a document, though, and a template a template, and Word knows the difference, and it only validates against the new extensions. All files with other extentions are treated according to their contents and it is still possible, and still perverse, of course, to have, say, a Word 2007-format document called "MyDocx.dot" based on a Word 2007-format template called "MyDotx.doc".

Word’s Normal Template

Word uses a Template, its Normal Template. The Normal Template is just a Template, a template like any other; it differs from other templates only in the way in which it is opened, and all that makes a Template the Normal Template is being opened as the Normal Template. Any template can be used as the Normal Template, and what you think of as your Normal Template can be used as an ordinary Document Template.

All that said, however, the Normal Template is special. There are some things (formatted AutoCorrects, for example), however, that, although they can be stored within any Template, can only be accessed in Word when the template is opened as Word’s Normal Template.

The Normal Template has existed, essentially unchanged, as far as I know, since the first days of Word. A minor technical change was made in Word 2007 in line with the new file types and the Normal Template is now a Macro-Enabled Template. There are some behavioural changes that follow from the validation of the file extensions, but Word 2007’s Normal Template is still a Template like any other, except that, when saved by Word, it is saved as a Macro-Enabled Template, with a ".dotm" extension in normal circumstances.

The particular instance of Normal Template that Word uses is determined according to a set of rules – similar to those it uses for Document Templates. If all else fails, Word, of course, has some built-in defaults, but it will, for preference, use whatever file you tell it to, and take it from the location you decide. Exactly what Word does by default, and what you can tell it to do instead, and how you can tell it, varies slightly according to the version and release of Word that you are using.

A long time ago there was a product called Word 97. Like its predecessors, it had a basic mechanism for finding its Normal Template, from which the current process has evolved. It looked in its Templates directories, and its own directory, before falling back on its built-in default. Should you be interested, there are Microsoft web pages on the subject for Word 97Word 97 [link to KB Article for Word 97 at http://support.microsoft.com/kb/198039] and for earlier versionsearlier versions [link to KB Article for earlier versions of Word at http://support.microsoft.com/kb/94732], which I believe to be correct.

It was in Word 2000 that the basic procedure that is still followed today, was laid down. There are Microsoft web pages on this subject, too, for Word 2000Word 2000 [link to KB Article for Word 2000 at http://support.microsoft.com/kb/214215], for Word 2002Word 2002 [link to KB Article for Word 2002 at http://support.microsoft.com/kb/291446], and for Word 2003Word 2003 [link to KB Article for Word 2003 at http://support.microsoft.com/kb/826839], but none of these appear to be completely accurate, and none of them mention the name of the Template. In the rest of this article the oldest version to which I refer is Word 2003, but, as far as I know, what I say about Word 2003 applies equally to Word 2002 and Word 2000.

Word 2007, of course, was a step change in many ways. The basics remained the same but the new file formats introduced an extra level of complexity. Microsoft seems to have decided not to attempt to describe what happens now.

Where is Word’s Normal Template?

For absolute clarity let me state, firstly and simply, that most users will find their Normal Template, called Normal.dot (in Word 2003), or Normal.dotm (in Word 2007 or Word 2010), in their User Templates folder, usually located at "%appdata%\Microsoft\Templates", and only if it is not there should they consider looking elsewhere, or for a file of another name.

Since Office 2000, Word has looked for its Normal Template in, or relative to, one of three places:

In the same way that the first place in which modern versions of Word look for a Document’s Template is the folder containing the document, so the first port of call for Word’s Template is the folder containing Word. It is unusual for modern versions of Word to find a template there, and the next place Word looks is the place where most users will actually have their Normal Template, the User Templates folder. Although some misguided systems administrators do attempt to do strange things, it is probable, even in a corporate environment, that this is where you will find yours.

According to the Microsoft KnowledgeBase articles mentioned above, the search order varies depending on whether the installation option “Run from My Computer” or “Run from Network” is chosen. These articles are incorrect in what they state about using the “Run from My Computer” option; I do not know whether they are right or wrong with regard to the “Run from Network” option.

Word’s Location

If you are a normal user (i.e. not an administrator) in a corporate environment you will probably find that you don’t have write authority to the folder where the Word executable is. Even if you are on your own computer, and do have administrator privileges, modern versions of Windows will make it awkward for you, although you should be able to do it with a little perseverance. That said, placing your Normal Template in Word’s Program Folder is not a course of action I would recommend.

Word can, of course, be installed anywhere, and even the default varies according to Word and Windows versions. For Word 2010 on a 32-bit Windows system, the default location is "C:\Program Files\Microsoft Office\Office14". There are complicated ways of finding out exactly where it is, but the easiest way is to ask Word. To do this in English:

As far as I can tell from some cursory investigation, the steps are the same in all languages, although the "Immediate" window may be called, for example, "Exécution", "Verificação imediata", or "Direktfönster", and the Ctrl key may be called, say, the Strg key.

The User Templates Location

The default location of Word's Normal Template is what Word calls the "User Templates" location, and the default for this, on an English system, is "%appdata%\Microsoft\Templates". If you have installed Word in Norwegian, say, as I did, then the default name will be "%appdata%\Microsoft\Maler" and this can cause a few problems, but neither the situation nor the problems will be mentioned further here.

%appdata% is what is called an Environment Variable; I use it because it allows me, concisely, and precisely, to specify the location. You can use it, too: just type it into the address bar of any Windows Explorer window and Windows will take you there – even if the location is, as it is by default, hidden. On a default English Windows XP system, %appdata% is "C:\Documents and Settings\user-name\Application Data"; on Windows 7, it is "C:\Users\user-name\AppData\Roaming". The actual folder name will have user-name replaced by whatever your user name is; on my Windows 7 system, for example, the actual folder name is "C:\Users\Tony\AppData\Roaming". If I change my UI language, "Users" might show as "Utilisateurs", say, or "ユーザー", but that is just a trick that Windows plays, and the folder is still called, and can be referred to as, "Users". On other versions of Windows, the name may be different, and, as it can be configured by administrators, it could, in theory, be almost anything.

Whatever the default, what matters is the actual location, which, if it has been changed from the default, is held in the Registry. It is an Office-wide setting, used by several Office applications, but only Word provides a way to change it, or even view it, via the User Interface. The registry setting is in the HKCU\Software\Microsoft\Office\vv.0\Common\General key (where "vv.0" is 14.0 for Office 2010, 12.0 for Office 2007, 11.0 for Office 2003, etc.), and the Value is called UserTemplates.

Prior to Word 2007, to see, or change, the location in Word, just needed a couple of clicks (Tools > Options > File Locations tab). As with most things, it is now a little harder to reach and, in Word 2010, you must go to File > Options > Advanced tab, scroll to the bottom and click on the File Locations button. However you get there, it is the place to find out what the location is set to. Alternatively, you can ask Word, as described above, except that this time the text to enter is "?Options.DefaultFilePath(wdUserTemplatesPath)" (without the quotes).

The Workgroup Templates Location

Word does not have a default location for what it calls "Workgroup Templates". It is intended as a location, probably on a network, where shared read-only Templates can be maintained. Microsoft state that you need full read/write access to your Normal Template and that it should not be shared, so it is slightly bizarre that Word ever chooses to look in what is intended as a shared location; Word, however, will open (though not automatically save) a shared Normal Template in Read-Only mode.

Like the User Templates location, the Workgroup Templates location is an Office-wide setting, changeable via the Word UI, and it is held in the same registry key, in the value called SharedTemplates. To ask Word what the location is, you use "?Options.DefaultFilePath(wdWorkgroupTemplatesPath)" (without the quotes).

What is Word’s Normal Template called?

The default, and usual, name of Word’s Template prior to Word 2007 was Normal.dot, and, since then, it has been Normal.dotm. There is, though, a registry value you can set to override this. It is in the HKCU\Software\Microsoft\Office\vv.0\Word\Options key (where "vv.0" is the Word version number, as described above), and the Value is called "GlobalDotName".

This registry Value can hold the name in a variety of formats, and the actions taken by Word, especially Word 2007 and Word 2010, vary according to the format. In, roughly, increasing order of complexity the possible formats are:

What does Word do with the Path and Name?

Given the defined folder search sequence, and the registry value for the name, Word knows exactly what to look for and where, but what does it do when it has found, or failed to find, any instance of the template it needs? That depends on the version of Word; Word 2003 had a relatively simple process, but Word 2007 and Word 2010 have to take account of more factors and have a considerably more complex process.

Word 2003

Using either the name specified in the registry, with a defaulted ".dot" extension if need be, or its built-in default of "Normal.dot", Word 2003 knows exactly what its Normal Template is going to be called, and it searches each of its locations in turn looking for a file of that name. There are, essentially, three possible outcomes from the search: a file is either found (in which case it is either valid or not valid) or one is not found.

Word 2007

Using either the name specified in the registry, with a defaulted ".dotm" extension if need be, or its built-in default of "Normal.dotm", Word 2007, just as Word 2003 before it, knows exactly what its Normal Template is going to be called, and it searches each of its locations in turn looking for a file of that name. Although, in principle, there are the same three possible outcomes from the search as there were in Word 2003, Word 2007 actually presents a far more complex picture than you might at first imagine.

Trust

Microsoft are very concerned about user safety and security, and have, over the years made many changes to try to protect users from malware and the like. In Office in general, and Word in particular, they have moved towards preventing macros from running without users’ explicit knowledge and consent. The options and mechanisms have changed over time, and Word 2007 saw changes that could affect your Normal Template. The circumstances that cause problems are limited and relatively unusual, so this is just a brief overview.

By Word 2007 the notion of Trust included Trusted Locations, and the Macro Security options, as presented in the UI, had been simplified. The user could ignore Microsoft’s recommendation and enable all macros, or there were three options for different levels of disabling macros in documents or templates not in trusted locations: disable all, disable all except signed, or disable all with warning. Enabling all macros was not, in most circumstances, wise, but, if chosen, all that I have written so far would hold true. If all, or all except signed, were disabled, again, all I have written would hold true.

When you use the option to disable macros (in non‑trusted locations) with warning, and you open a document or template containing macros, Word 2007 does not actually disable macros, or stop them running. What Word 2007 does is to load the document or template as normal except that, instead of loading its VBA project, it creates a new, dummy, VBA project that can be used in the session but which will not be saved. There is no possibility of any payload doing anything untoward, because it has simply been left on the shelf, as it were. A ‘Security Warning’ is displayed on the message bar under the Ribbon, along with a button, labeled “Options”; clicking on the button brings up a Dialog from which you can decide what to do. If you choose to enable the macros, Word will then load the real VBA Project in place of its dummy one. Exactly how it does this is, as you probably expect by now, not entirely straightforward.

If the document or template containing the macros you are enabling, has not been changed, Word just loads the VBA project that belongs with it. If, however, the document or template has been changed, Word saves the changes made to the document or template itself, but not those made to the dummy VBA project, before re‑loading the entire document, this time with its VBA project. This difference in behaviour is significant if the macros you are enabling are in your Normal Template because Word makes a mistake.

As you have seen above, Word 2007 demonstrates a variety of different behaviours, in a variety of very specific sets of circumstances, and adding trust to the equation just introduces another level of complexity. Most of the situations described above are very unlikely, and have been presented only for the sake of completeness. I do not propose to detail all the complications that can arise in all possible circumstances involving untrusted locations, but there is one situation that you might find, perhaps even create unintentionally, and that, very specific, situation is what is described here.

If you start Word with a Normal Template – an ordinary macro‑enabled Word 2007 format template with a .dotm extension – in an untrusted location (and that location is different from your User Templates location) and, before making any changes to the Normal Template, you enable macros via the Dialog, then Word 2007 will try to load the VBA Project from a file with the same name as your Normal Template but in the User Templates location. If you don’t have such a file, you will get an error message and your macros will not be available to you, but if you do happen to have such a file, Word will load the VBA Project from it alongside the dummy VBA project it has already created. Word will then have two VBA Projects, both purporting to belong to your Normal Template, one dummy one and one from a file on disk that is not your Normal Template.

Changes you make to your VBA project will never be saved where you want them, but Word does know exactly what it is dealing with, and will offer to save any changes to the real VBA project (of the wrong file), but not any made to the dummy one. When you close Word it will either save your Normal Template automatically, or prompt you about it if you have the relevant option set, but it will not save any VBA to the same file. If you have made changes to the VBA project, Word will prompt you separately for permission to save the file, as it would with any other document or template you had open. The file it is prompting about, which is not immediately obvious from the text of the prompt, and the one to which it will save the VBA project, is the file in the User Templates location from which it loaded the VBA project; it will not make any changes to the rest of this file, just the VBA project.

Provided you know what is going on, everything does work and could be considered consistent, but I can’t think of any reason anyone would want this behaviour. Nor, indeed, can I think of any behaviour that Word exhibits in any circumstances where the Normal Template is not in a trusted location, to be useful. Word expects you to trust your Normal Template, despite the fact that it can, all it by itself, on occasion, cause that not to be the case.

Word 2010

As far as I can tell, Word 2010 behaves in exactly the same way as Word 2007, with a single exception. In the case where Word 2007 renames an old ".dot" file by adding "11" to the name, Word 2010 renames by adding "old" to the name instead of "11".

What about Outlook?

Prior to Office 2007, if you used Word as your Outlook editor, the instance of Word that ran inside Outlook was the same as any other instance of Word that you ran, and it shared Word’s Normal Template. This sharing did cause some problems and, partly as a way of overcoming those problems, Office 2007 introduced a new mechanism.

In Outlook 2007 it is no longer optional to use Word as your editor – it is compulsory. Outlook 2007 ships with a limited-functionality copy of Word just for use in Outlook, sufficient for normal use in Outlook, which gains some extra features if you also have the full version of Word installed. The instance of the version of Word that runs in Outlook 2007 (and Outlook 2010) is separate from any other instance of Word you run. Separate settings are maintained, both in the registry and in the Normal Template, and the Normal Template used in Outlook is, by default, called "NormalEmail.dotm".

The version of Word that runs in Outlook, however, is still Word and it works in, essentially, the same way as any other version of Word, and this similarity extends to giving you the option to override the default name of the Normal Template. The name is held in the same registry key as, and works in the same way as, the name of Word’s ordinary Normal Template. For the Word Editor in Outlook, the registry Value is called GlobalEmailDotName.

Can Outlook use the same Normal Template as Word?

Well, yes, and no! You might think that if you set up the registry entries, GlobalDotName and GlobalEmailDotName, so that they were both the same that you could make Word and Outlook share the same Normal Template. Things, of course, are never as simple as one would like them to be, but you can make it work most of the time.

I mentioned earlier that Word will open a shared Normal Template in Read-Only mode, and this is true, but it doesn't really tell you anything very much about what happens. Word requires a Normal Template exclusively for its own use and will ensure that it gets one. If the Normal Template it wants to open is already in use in another Word session, Word will take a copy of the latest saved version and open that copy in Read-Only mode.

Read-Only Mode

Briefly, for it is not the matter at hand, and as you know, when Word opens a Document you sometimes get a message that the document is locked for editing, something like this:

Word’s ‘Document Locked’ Prompt
Word’s prompt when a Document is already in use

This prompt may, or may not, tell you who, Word thinks, has locked the file, but it does always inform you of (what it thinks is) the situation and allows you to make a choice.

When Word opens a Document it will determine, according to a clear set of rules, the Template to which to attach it and will, if necessary, open that Template. When Word opens a Template in this way, just as when it opens a Document, it checks to see if that Template is already in use elsewhere. In this case, however, if the Template is open in another instance of Word, you are not prompted: Word just automatically opens the Template in Read Only mode, or, more precisely, it opens a copy of the Template in Read-Only mode.

If you make changes to a Template that has been opened in Read Only mode, and try to save those changes, it is at that point that Word will prompt you. If the Template is still open elsewhere, Word will tell you:

Word’s ‘Template In Use’ Prompt
Word’s prompt when a Template is in use

When you acknowledge the prompt, Word will show a SaveAs dialog for you to save the Template somewhere else, or to give it a different name. If the Template is no longer open elsewhere, Word recognises this but does not know whether any changes have been made to it by any other instance of Word. In this case, it prompts you slightly differently:

Word’s ‘Template Was In Use’ Prompt
Word’s prompt when a Template may have been changed

The effect is the same: Word has done its best to warn you of potential problems and you have taken whatever action you deemed suitable.

The Normal Template in Read-Only Mode

When Word opens its Normal Template, it does exactly the same as when it opens a Template to attach to a Document, that is, it automatically opens a copy of it in Read-Only mode if it is open in another session of Word and only warns you when you attempt to save changes made to it.

If you try to use the same Normal Template for both Word and Outlook 2007 (or 2010), what happens depends on which application you start first, because that session of Word is the one that, in effect, holds the master copy of the Normal Template.

If, as many people do, one of the first things you do in the morning is to start Outlook to check your e-mail, then Outlook will open your Normal Template and apply a lock on it. When you then start Word, it will find the lock and open a copy of the Normal Template for itself in Read Only mode. If you close Word while Outlook is still running you will get the first of the two prompts above, and be unable to save your amended Normal Template over the top of the existing one. If you close Outlook first, and then try to save your Normal Template in Word, you will get the second of the prompts above, and you will be able to save, but only at the cost of overwriting any changes you made to the Normal Template in Outlook. As you are much more likely to make changes in Word than in Outlook, you can probably get away with losing the changes made in Outlook, but this is not a good way to work.

If, on the other hand, you start Word first, before you start Outlook, then it will be Word that opens your Normal Template and applies the lock on it, and Outlook that opens the Read-Only copy. Once Outlook has a Read-Only copy, it has it for the duration of the session; it doesn't make any attempt to lock the template when it becomes free, so you are free to open and close Word as often as you like afterwards. When you close and re-open Outlook, it will pick up the latest version you saved in Word and, provided Word is open at the time, Outlook will only pick up another copy.

In summary, if you wish be able to ‘share’ the Normal Template and to gain access, in Outlook, to changes made in Word, you might very well be prepared to accept the constraints: that you open Word before you open Outlook, that you don't make changes in Outlook that you wish to save, and that you must save the Normal Template in Word and close and re-open Outlook (while keeping Word open) in order for Outlook to gain immediate access to any changes. Only you can really know, but, for most people in most circumstances it should be a satisfactory work-around.

What Else Should You Know?

One could probably write a book about the Normal Template but my intent here was simply to cover how Word finds it and, thus, how you could find yours. I have already written far too much and this final section is tying up loose ends, as it were; I simply note the following:

Could there be yet more?

Well, yes, of course, but that’s enough, if not too much, for now. Well done for reading this far; you may now resume your normal life.