Please Note: This article is written for users of the following Microsoft Word versions: 97, 2000, 2002, and 2003. If you are using a later version (Word 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Word, click here: Pulling Headers and Footers from Other Files.
Written by Allen Wyatt (last updated June 25, 2018)
This tip applies to Word 97, 2000, 2002, and 2003
Steve asked if there was a way in Word to set up common headers or footers in one or more separate files and then include them in a .DOT document template.
The traditional way of handling this type of situation is through the use of the INCLUDETEXT field. This field fetches information from a file and includes it in place of the field itself. To use this field, you follow these steps:
{ INCLUDETEXT "C:\\My Documents\\MyHeader.doc" }
Remember that Word maintains the field code in the template file, so that whenever you create a document based on the template, the contents of MyHeader.doc are fetched and included in the header of the new document. Likewise, your new document includes the INCLUDETEXT field (just as the template does), and whenever you update the field in the new document, Word dutifully fetches MyHeader.doc to replace the field.
If you want to completely get rid of the INCLUDETEXT field in the document created from the template (which would make the included text a snapshot of what MyHeader.doc contained at that point in time), you will need to get just a bit more creative. You could include an AutoNew macro in your template that would select the INCLUDETEXT field, update it, and then unlink it. The following would do the trick:
Sub AutoNew() If ActiveWindow.View.SplitSpecial <> wdPaneNone Then ActiveWindow.Panes(2).Close End If If ActiveWindow.ActivePane.View.Type = wdNormalView Or _ ActiveWindow.ActivePane.View.Type = wdOutlineView Then ActiveWindow.ActivePane.View.Type = wdPrintView End If ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader Selection.MoveRight Unit:=wdCharacter, Count:=1, Extend:=wdExtend Selection.Fields.Update Selection.Fields.Unlink ActiveWindow.ActivePane.View.SeekView = wdSeekMainDocument End Sub
Note:
WordTips is your source for cost-effective Microsoft Word training. (Microsoft Word is the most popular word processing software in the world.) This tip (1698) applies to Microsoft Word 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Word (Word 2007 and later) here: Pulling Headers and Footers from Other Files.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
When you need to make changes to the header or footer of a document, the Header and Footer toolbar is invaluable. What if ...
Discover MoreIf you don't want the information in a header of footer to be changed by users of your document, there are a couple of ...
Discover MoreWhen working with existing documents, you may need to delete a header or footer previously created. Here's how you can do ...
Discover MoreFREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Word that uses the menu interface (Word 97, Word 2000, Word 2002, or Word 2003)? This site is for you! If you use a later version of Word, visit our WordTips site focusing on the ribbon interface.
Visit the WordTips channel on YouTube
FREE SERVICE: Get tips like this every week in WordTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments