If you've ever had to prepare a table of contents manually, you'll appreciate how thoroughly Word automates the process. Word can do in moments what used to take hours.
In the next few sections, you'll learn the quickest ways to compile tables in your documents. You'll learn a few tricks for getting your tables of contents to look exactly the way you want them to, when Word doesn't do the job as automatically as you might like. You'll even learn how to instantly create a table of contents that appears in a frame on a Web page?a task that previously required painstaking HTML coding.
NOTE
If you're planning a document that will have a table of contents, be sure to use Word's heading styles (Heading 1, Heading 2, Heading 3, and so forth). It's far easier to automate the construction of your table of contents if you've done so.
Sometimes you need a table of contents but you don't especially care what it looks like. If you used heading styles in your document, you can have your table of contents in less than 60 seconds.
To create a default table of contents, click where you want it to appear. Choose Insert, Reference, Index and Tables; click the Table of Contents tab (see Figure 20.1), and click OK.
Word inserts a table of contents based on the first three heading levels in your document, using the built-in table of contents styles in your current template, with a dotted-line tab leader and right-aligned page numbers. If you already inserted specially formatted page numbers in your document, such as page numbers that include chapter numbers, those appear in your table of contents.
In short, you now have Word's default table of contents (see Figure 20.2). If that isn't enough for you, the rest of this section shows how to change Word's default settings to get the exact table of contents you have in mind.
TIP
When you work in Normal, Print Layout, or Reading Layout view, table of contents entries act as hyperlinks, even though they appear as regular text. Except in Reading Layout, you can Ctrl+click on any table of contents entry to move to the corresponding location in your document.
If you display your page in Web Layout view, by default the table of contents entries look like Word hyperlinks?in other words, they appear as blue underlined text. By default, the page numbers disappear (because page numbers are largely irrelevant on Web sites). If you would rather display page numbers instead of hyperlinks, clear the Use Hyperlinks Instead of Page Numbers check box in the Table of Contents tab of the Index and Tables dialog box.
When Word inserts a table of contents in your document, it's actually inserting a TOC field with the specific instructions you gave Word about how to build the table of contents. Later in this chapter, you'll learn a little more about this field so that you can manually control some aspects of your tables of contents that can't easily be controlled through the Table of Contents tab of the Index and Tables dialog box.
For more information about controlling tables of contents with TOC fields, see "Creating a Table of Contents for Part of a Document," p. 695.
TIP
Before you compile a table of contents for a printed document, take these steps to make sure you get an accurate one:
Make sure you've used heading styles for all the headings you want Word to include in your table of contents. As you'll see later (in the section "Setting the Styles and Outline Levels Word Compiles in Your Table of Contents"), you can include other styles and text in a table of contents if you're willing to invest a little extra time. But it's usually simplest to stay with headings.
Make sure you properly set margins and other section formatting that can affect page count.
Make sure hidden text is actually hidden. (When displayed, hidden text appears with a thin dotted underline. To hide it, click on the Show/Hide Paragraph Marks button on the Standard toolbar.)
Make sure your document is displaying field results rather than the fields themselves. If you see field codes within curly brackets, press Alt+F9 to display field results throughout the document.
Unless you have fields you do not want to update, update all your field results this way: Press Ctrl+A to select the entire document and then press F9.
In Chapter 24, "Using Word to Develop Web Content," you will learn how Word makes it easy to create frames that divide Web pages into sections that can be browsed independently. One common Web design technique involves using one frame as a table of contents, which remains displayed as the user navigates the site. Each item in the table of contents is displayed as a hyperlink that the user can click to display the corresponding location in another frame.
Traditionally, creating tables of contents in frames has been a labor-intensive, complex process. In Word 2003, it's simple?again, assuming that you build your table of contents from heading styles. When you're ready to create your table of contents, choose Format, Frames, Table of Contents in Frame. Word creates a new frame at the left side of the screen and inserts table of contents hyperlinks corresponding to any heading in your document based on a heading style from Heading 1 through Heading 9. Figure 20.3 shows an example.
After you create a frame containing a table of contents, you can format it as needed. For example, you might want to consider
Adding a company logo and a heading at the top of the Table of Contents frame
Increasing the size of the hyperlinks (12-point Times New Roman by default), though the text's actual size may depend on the browser displaying it
Deleting low-level headings (such as headings built from third- or fourth-level heading styles, or lower) if they make the table of contents too cumbersome, or too lengthy to fit on a single screen
Editing some of your hyperlinks for brevity and clarity. Headings that work well in print, or at the top of a page, may be too long or formal to attract clicks on an intranet or a Web site. Figure 20.4 shows how the table of contents created in Figure 20.3 has been adapted for more effective Web use.
CAUTION
Be careful not to overuse frames, or to create frames that take up too much screen "real estate"?leaving too little space for the content you want to communicate.
You can find a more detailed discussion of the advantages and disadvantages of frames in Chapter 24.
NOTE
When you use Format, Frames, Table of Contents in Frame, Word inserts a separate { HYPERLINK } field for each line of the table of contents, placing these hyperlinks in a new left frame.
However, if you have a Word document that contains a table of contents, and you save that table of contents as a Web page, the table of contents will remain a single TOC field. The table of contents remains in the same location where you originally placed it. If you created the TOC using default settings, the page numbers and leader lines will disappear when displayed as a Web page. However, if you display the Web page in Print Layout view, or resave it as a printed document, the page numbers and leaders reappear.
Sometimes the default table of contents format Word applies isn't appropriate for your document. If so, you have two choices:
Try out one of the six additional table of contents formats Word provides.
Adapt Word's built-in table of contents styles to your specific needs.
Word offers six built-in table of contents formats for use in printed documents: Classic, Distinctive, Fancy, Modern, Formal, and Simple. One of these might do the job if you don't have sophisticated requirements or a set of graphics standards with which to comply. (In truth, none of Word's built-in formats is especially classic, distinctive, fancy, modern, or formal, though Simple is reasonably simple.)
To try out a built-in format, first choose Insert, Reference, Index and Tables, Table of Contents. Next, choose the format in the Formats drop-down box. In the Print Preview box, Word shows a generic table of contents for a printed document that uses this format. In the Web Preview box, you can see how the same format would look if you saved the page as HTML and displayed it on a Web browser.
If you like what you see, click OK, and Word builds a table of contents that follows the format you've chosen.
The appearance of your table of contents is defined in part by the formatting of nine built-in styles, TOC 1 through TOC 9. If you are building a document that uses custom fonts and formatting throughout, it's likely that you'll want to adapt Word's built-in TOC styles as well. Word's Index and Tables dialog box includes a Modify option, which connects you to Word's Style dialog boxes where you can change these styles.
See "Changing Styles," p. 345.
Working through Word's nested Style dialog boxes can be time-consuming, however. There's a quicker way to change your TOC styles:
Choose Insert, Reference, Index and Tables.
Choose the Table of Contents tab.
Click OK to insert a table of contents in your document. Don't worry about how it looks just yet.
After the table of contents is inserted, select any first-level TOC entry formatted with the TOC 1 style. Be careful not to select the entire table of contents.
TIP
Sometimes, Word doesn't let you select the first line of a field result without selecting the entire field (for example, the entire table of contents). There are two workarounds.
If your table of contents includes several lines formatted as TOC 1, select one from the middle (instead of the beginning) of your table of contents.
If your table of contents has only one line formatted as TOC 1, do the following. First, right-click after the first character in the first line, press Esc to hide the shortcut menu, and press Enter. Now, you can select the new second line, reformat it, and then edit it to place the first character back where it belongs.
Reformat the TOC 1 entry the way you want it to look.
Repeat steps 2?3 for each additional TOC style in your table of contents.
TIP
It's often easiest to navigate and select text from within a table of contents by using keyboard shortcuts. Use Ctrl+Shift+left arrow to select words to the left, or Ctrl+Shift+right arrow to select words to the right.
If you left-click in a table of contents, Word jumps to the location corresponding to the table of contents listing you clicked on. Alternatively, you can right-click in the table of contents and press Esc to hide the shortcut menu that appears, while leaving your insertion point in the table of contents.
If you used Word's default settings, which capture only heading levels 1 through 3 in a table of contents, you have to reformat only two more styles: TOC 2 and TOC 3. As you change each style, Word immediately updates all the TOC entries that use the same style to reflect the new formatting.
CAUTION
After you have the TOC styles you want, don't choose another format in the Table of Contents tabbed dialog box. By default, Word doesn't just reformat your table of contents; it reformats your custom styles with the built-in formats you just chose.
(This automatic style updating won't occur if you clear the Automatically Update check box in each style's Modify Style dialog box?the dialog box that appears if you click Modify from within the Table of Contents tab of the Index and Tables dialog box.)
TIP
If you want to make adjustments to individual heading styles and outline levels directly in the document, click Show Outlining Toolbar. Word displays the Outlining toolbar, containing tools you can use to do so. To learn more about the Outlining toolbar, see Chapter 18, "Outlining: Practical Techniques for Organizing Any Document."
Occasionally, you might want to compile printed tables of contents that do not include page numbers. For instance, many people insert tables of contents without page numbers as a way to generate a quick hard-copy document outline for use in a meeting.
To tell Word not to include page numbers in a printed table of contents, display the Table of Contents tab, clear the Show Page Numbers box, and click OK.
In many cases you will want Word to include page numbers, but you'll want more control over where they appear. In most cases, the page numbers that Word includes in its built-in table of contents formats are right-aligned, as shown earlier in Figure 20.2. However, you can tell Word to place the page numbers next to the table of contents entries rather than right-align them.
To tell Word not to right-align page numbers in a table of contents, display the Table of Contents tab, clear the Right Align Page Numbers check box, and click OK.
Finally, in printed documents, if you create a table of contents based on the TOC styles in the Normal template (for example, if you use the From Template format in the Table of Contents tabbed dialog box), Word inserts a tab leader on each line (refer to Figure 20.2). By default, this tab leader is a series of dots that runs from the end of the table of contents text entry to the page number.
NOTE
Tab leaders disappear in Web Layout view unless you clear the Use Hyperlinks Instead of Page Numbers check box.
You can change the tab leader, or eliminate it altogether. Display the Table of Contents tab and choose the leader you want in the Tab Leader drop-down list box. Word offers dots, dashes, and solid underlines?or you can choose (none) to show no leader.
By default, Word builds tables of contents from the first three heading levels. In other words, it collects all text formatted with the Heading 1, Heading 2, and Heading 3 styles and incorporates that text in the table of contents.
NOTE
If you want, you can also include text you have manually formatted with specific outline levels?even if that text is not formatted with a heading style. To learn how, see the following section, "Setting the Styles and Outline Levels Word Compiles in Your Table of Contents."
To change the outline level associated with a block of text (other than a heading), choose Format, Paragraph; click on the Outline Level drop-down box; and choose the level you want.
Of course, this means your table of contents won't include Heading 4 through Heading 9 text. This may be a problem, especially if you used Heading 1 as only a chapter heading. In that case, your table of contents has only two levels to cover everything important that's going on within your chapters.
TIP
One way to avoid this problem is to format chapter headings using Word's Title style instead of the Heading 1 style.
You can tell Word to place from one to nine levels in a Word table of contents. To do so, first display the Table of Contents tab of the Index and Tables dialog box. Choose a number from 1 to 9 in the Show Levels scroll box and click OK.
Word builds the table of contents using all the outline levels you've selected. For example, if you set Show Levels to 5, your table of contents would be built from headings formatted as Heading 1, Heading 2, Heading 3, Heading 4, and Heading 5, plus any other text formatted using Outline Levels 1 through 5.
You've just learned how to control the number of levels included in your table of contents. But, in the example described earlier, for instance, you may not want Heading 1 included at all?because you've used it as a chapter title, not a subheading. Word allows you to specify exactly which styles Word looks for when it builds your table of contents?and in the next section, you'll learn how.
Sometimes you may want to compile tables of contents based on styles other than Heading 1 through Heading 9. Word enables you to pick any styles you want and choose the order in which they'll be placed in your table of contents. Display the Table of Contents tab and click Options. The Table of Contents Options dialog box opens (see Figure 20.5).
Check marks appear next to all styles already in your table of contents. If you want to remove a style, delete the number in its corresponding TOC Level box. To add any style that's already in your document, click its TOC Level text box and enter a number from 1 to 9 there. More than one style can share the same level.
By default, Word does not include text formatted with specific outline levels in your table of contents, unless that text is also formatted with corresponding Heading styles. You might occasionally want to change this behavior. For example, you might have formatted a block of body text as Outline Level 1, 2, or 3, using the Format, Paragraph dialog box. You might now want to include that block of text in your table of contents. To do so, check the Outline Levels check box.
NOTE
Because you can choose only from styles that already exist in your document, make sure you've added all the styles you want before building your table of contents.
When you're finished setting the styles and outline levels you want to include in your table of contents, click OK to return to the Index and Tables dialog box. If your other settings are the way you want them, click OK again to compile your table of contents.
NOTE
If you decide to revert to Word's default styles (Headings 1 through 3), click the Reset button in the Table of Contents Options dialog box.
On occasion, you might want your table of contents to include entries that aren't associated with either styles or outline levels. For example, you might want the first sentence of certain sections of your document to appear in your table of contents, but you might prefer not to create a style for the paragraphs where these sentences appear. In some instances, you could reformat these paragraphs with a certain outline level, but this often causes problems with your outlines or numbering schemes.
In some other situations you might prefer to create at least some of your table of contents entries without using styles, as well:
You want to include an entry that paraphrases text in your document rather than repeating it precisely.
You want to include only one entry formatted with a given style, not all of them.
You want to suppress page numbering for selected table of contents entries, but not for all of them.
You can use Table Entry fields to instruct Word to include any text in a table of contents. It's a two-step process. First insert the fields in your document, and then instruct Word to use them in building the table of contents by checking the Table Entry Fields check box in the Table of Contents Options dialog box. The following two sections walk you through the process.
See "Inserting a Field Using the Field Dialog Box," p. 775.
TC fields are markers that Word can use in compiling a table of contents. You can place a TC field in any location in your document for which you want a table of contents entry. When Word builds the table of contents, it creates the entry by including
Entry text you've specified within the TC field
A page number corresponding to the location of the TC field in your document
If you intend to insert only a few TC fields, or if you're uncomfortable working with field codes, use the Mark Table of Contents Entry dialog box. If you intend to create many TC fields, you may find it faster to enter them directly into your document by pressing Ctrl+F9 to display field brackets and entering the syntax between the brackets. Both approaches are covered next.
To enter a TC entry field using the Mark Table of Contents Entry dialog box, follow these steps:
Click where you want your TC entry (not the table of contents itself) to appear.
Press Alt+Shift+O to display the Mark Table of Contents Entry dialog box (see Figure 20.6).
Type or edit the text of your entry in the Entry text box.
In the Level scroll box, enter the outline level you want to assign to your TC field. You can enter any level from 1 to 9. If you don't enter a number, Word assigns the entry to Outline Level 1.
If you want to place this entry in a separate table of contents from the main table of contents, enter a table identifier letter.
For more about creating multiple tables of contents in the same document, see "Adding a Second Table of Contents to Your Document," on p. 694.
Click Mark. Word inserts a TC entry at the current location in the document.
Click Close.
If you plan to insert many TC fields at once, or if you need to use specialized options not available through the Mark Table of Contents Entry dialog box, you might prefer to enter TC fields directly in your document?that is, without using the Mark Table of Contents Entry dialog box.
As soon as you enter a TC field, Word immediately formats it as hidden text that isn't visible for editing. Before you enter TC fields, therefore, toggle the Show/Hide Paragraph Marks button on the Standard toolbar to display hidden text.
Next, press Ctrl+F9 to display field brackets and enter the appropriate syntax for the TC field. TC fields use the following syntax:
{ TC "Words you want to appear in table of contents" [Switches] }
In other words, immediately after the field name TC, enter the text you want Word to place in your table of contents, within quotation marks.
When you enter TC entries directly in your document by inserting field codes, you have all the options described previously, as well as some additional options?for example, the option to suppress page numbers in your table of contents. These options are available by adding switches to your field code, as presented in Table 20.1.
Switch | What It Does |
---|---|
\l Level | Specifies which level of your table of contents to use. If no switch is included, Word assumes Level 1. Example: { TC "Continental League" \l 3 } tells Word to insert a third-level entry consisting of the words Continental League and formatted using the TOC 3 style. (Corresponds to Outline Level in the Field dialog box.) |
\n | Tells Word not to include a page number for this entry. Example: { TC "Bonus Coverage" \n } tells Word to include the words Bonus Coverage in the table of contents, but not to include the page number on which the field appears. (Corresponds to Suppresses Page Number in the Field dialog box.) |
\f Type | Specifies in which list of figures to include this entry. Type corresponds to any character of the alphabet; all TC fields that use the same character are compiled together in the same table of contents. Example: { TC "Mona Lisa" \f m } tells Word to include a table of figures entry named Mona Lisa whenever a table of contents is compiled from all the TC fields that use the \f m switch. The field { TC "Warhol" \f x } would not be included in the same table of figures, because a different letter?x, instead of m?has been used. This switch is used only for tables of figures, not for tables of contents. (You can add an \f switch by checking TC Entry in Doc with Multiple Tables in the Field dialog box; however, the Field dialog box provides no way to add the letter you need to place after the switch.) |
To learn more about working with switches in field codes, see "Viewing and Editing the Field Code Directly," on p. 780.
To learn more about tables of figures, see "Building Tables of Figures," on p. 706.
Here are two more examples: Table 20.2 presents examples of TC fields and what they do.
Sample Field | What It Does |
---|---|
{TC "Marketing Reorg" \l 2 } | Inserts a second-level table of contents entry Marketing Reorg (including page numbers) |
{ TC "Smith" \l 1 \n } | Inserts a first-level entry Smith, with no page number |
TIP
After you have the TC syntax correct, you can copy TC fields wherever you need them, changing only the elements that need to change, such as the text that Word places in the table of contents.
There is a workaround you can use to keep TC fields (and other hidden fields) visible while you're working on them.
TIP
After you enter field brackets, type an unusual character, such as ^, before you enter the letters TC. Word won't recognize that you're creating a hidden field.
Create all your fields this way, and with your field codes displayed, use Word's Replace feature to replace all the ^ characters with no text. Word now recognizes the fields as hidden and hides them all (unless you've set Word to display hidden text).
After you enter TC fields wherever you need them, choose Insert, Reference, Index and Tables to reopen the Table of Contents tab. Click Options to view the Table of Contents Options dialog box. Next, make sure the Table Entry Fields check box is checked. (In Word 2003, this check box is cleared by default.)
If you want your table of contents to be built from TC fields only, clear the Styles and Outline Levels check boxes. Click OK to return to the Table of Contents tab; click OK again to compile the table of contents.
Your table of contents entries are likely to change after you first create your table of contents. Perhaps edits or margin changes will affect your page numbering. Possibly new headings will be added to your document, or you may be called on to reorganize existing headings. Or maybe you've used Word's outlining tools to change heading levels. Whatever the reason, you may need to update your table of contents to reflect changes in your document. Follow these steps:
Right-click on the table of contents and choose Update Field from the shortcut menu.
Choose whether you want to update only page numbers or the entire table (see Figure 20.7). If you update the entire table, you lose any manual formatting or editing you've done within it. However, you may have no choice if you've added or reorganized headings; these changes aren't reflected if you update only page numbers.
TIP
What if you've done extensive formatting and editing in your table of contents? It seems a shame to lose all that work for just one or two new headings. You don't have to. You can patch your table of contents to reflect the new headings. Click where the new heading should appear in your table of contents and type it in manually.
Even better, use Word's Cross-Reference feature twice?first to insert the heading text and then again to insert the page reference. You may also have to manually apply the heading style that corresponds to the heading level you want and polish up the formatting to make sure it matches its surroundings.
As a result, you have a cross-referenced field that updates just as the rest of the table of contents does. Everything works fine?unless you forget to tell Word to update the entire table rather than just page numbers. (That's what Undo is for!)
To learn more about cross-references, see "Working with Cross-References," p. 758.
You might want to add a second table of contents to your document. What kinds of documents have two tables of contents? It's increasingly common for how-to manuals and books (such as this book) to have a high-level, "at a glance" table of contents, as well as a more detailed, conventional table of contents that goes several levels into the document.
You might also want to insert separate tables of contents for each major section of a book, as well as an overall table of contents in the front. Whatever your reason, adding a second table of contents is easy to do.
After you insert your first table of contents, click where you want the second one to appear, establish its settings in the Table of Contents tab, and click OK. Word asks whether you want to replace your existing table of contents. Click No, and the second table of contents appears.
TIP
If you need more than two tables of contents, you can add them by following the same procedure described here. When you have two tables of contents, each one can be updated separately. (In fact, updating one doesn't automatically update the other.)
The procedures you've just learned for creating and updating tables of contents work fine most of the time. For example, they're perfect for including a second high-level table of contents that includes only one or two heading levels. But what if you want to insert a table of contents for only part of a document? Use a TOC field.
As you learned earlier, when Word inserts a table of contents, it's actually inserting a TOC field with switches that correspond to the choices you made in the Table of Contents dialog box. However, you can do a few things with the TOC field directly that you can't do through a dialog box, and compiling a table of contents for only part of a document is one of them.
First, select the part of the document for which you want to create a table of contents. Next, bookmark it. To do so, choose Insert, Bookmark; enter the name of the bookmark; and click Add.
Now that you have a bookmark, insert a TOC field where you want your table of contents to appear. Include the \b switch and the bookmark name. Here's a bare-bones example which assumes that you've already created a bookmark named Jones:
{ TOC \b Jones }
TIP
The TOC field has many switches. Follow these steps to get the exact partial table of contents you want without learning them all:
Create your bookmark, as described previously.
Create and insert your table of contents the conventional way by making choices in the Table of Contents tab of the Index and Tables dialog box.
Select the entire table of contents, right-click, and choose Toggle Field Codes from the shortcut menu.
Click inside the field code, next to the right bracket.
Type \b followed by the name of the bookmark you created.
Right-click on the field and choose Update Field from the shortcut menu. The Update Table of Contents dialog box appears.
Click Update Entire Table, and choose OK.
If you're sure that nothing will change in your table of contents except page numbers, there's an easier way to get a partial table of contents. Insert a table of contents the way you normally would, and just edit out the entries you don't need.
Alternatively, you can copy the entries you want and paste them beneath the table of contents; then delete the original table of contents. The entries paste into the document as hyperlinks, formatted with blue underlining. You can reformat them as needed; they will still update correctly when your page numbers change.
After you do this, remember to update only page numbers, not the entire table.
It's common for large documents to be composed of multiple smaller documents that need to be brought together into a single table of contents. The easiest way to do this is to work with Word's master document feature, discussed in Chapter 19, "Master Documents: Control and Share Even the Largest Documents."
First, display your document in Outline view and set up your subdocuments (or insert subdocuments using documents that already exist). Place your insertion point where you want the table of contents to appear. Next, choose Insert, Reference, Index and Tables. If you are asked whether to open all subdocuments before continuing, choose Yes. (If you choose No, Word doesn't include the missing subdocuments in your table of contents.)
The Index and Tables dialog box opens. Establish the settings you want for your table of contents and click OK. Word inserts your table of contents at the insertion point.
NOTE
In Outline view, your table of contents appears as 10-point body text. To view your table of contents as it will print, choose Print Layout view. To view your table of contents as it would appear on the Web, choose Web Layout view.
Although master documents are often the best way to build tables of contents incorporating several documents, you may occasionally want to make reference to a table of contents in another document without using master documents.
For instance, you might be sending a memo summarizing the contents of a document now being developed; or you may prefer not to use master documents because they have a reputation for being somewhat susceptible to corruption.
Word provides a special field, the Referenced Document (RD) field, for tasks such as these. Using the RD field to build a table of contents is a two-step process: First you create the RD field, specifying which file you want to reference. Next, you insert your table of contents.
NOTE
When you build a table of contents with the RD feature, Word incorporates entries from both the referenced document and your current document. The entries associated with your referenced document are located as if the entire referenced document were located at the spot where you inserted the RD field.
As discussed earlier in this chapter, there are two ways to enter a field such as RD: from the Field dialog box, or by pressing Ctrl+F9 to display field brackets and entering the syntax between the brackets.
To enter the RD field from the Field dialog box, choose Insert, Field, and choose RD from the Field Names scroll box. In the Filename or URL: text box, enter the name of the document you want to reference, along with its path.
If you are using a path relative to the current document (in which the referenced document will always be in the same folder as the current document, or in a subfolder with the same hierarchical relationship to the current document), check the Path is Relative to Current Document check box. Click OK.
If you prefer to enter field codes directly, before you do so, be sure to click the Show/Hide Paragraph Marks button on the Standard toolbar to display hidden text. RD fields are invisible, and if you don't display hidden text, Word hides them as soon as you enter the letters RD within the field?even before you finish editing the field.
RD fields use the following syntax (notice the double backslashes in the pathname, which are required to specify a path in a Word field):
{ RD "c:\\folder\\filename.doc" }
If the file you want to reference happens to be in the same folder as your current document, you can simply specify the filename, as shown here:
{ RD "filename.doc" }
CAUTION
Whether you use a full pathname or reference a file in the current folder, if you move the referenced file, the link is lost. This is true whether you create the field using the Field dialog box or create it directly in the document using field brackets.
There is one exception: If you reference a file in the current folder and move both the file you're working on and the file you're referencing, the link remains intact as long as both files are in the same folder.
Now that you've entered the RD field, you can insert your table of contents the way you normally would: Click in the document where you want it to appear; choose Insert, Reference, Index and Tables; choose the Table of Contents tab; establish the settings you want; and click OK.
TIP
When you use the RD field for applications like the ones discussed earlier, you may want to make some changes to Word's default settings in the Table of Contents tab.
For example, if you are summarizing another document's table of contents and you want only high-level headings to appear, adjust the Show Levels spin box to 1 or 2. In many cases, your readers don't need to know the page numbers of the referenced document, and you can also clear the Show Page Numbers check box.
Figure 20.8 shows an RD field and TOC field in a memo; Figure 20.9 shows the corresponding field results. Note that the table of contents has been manually reformatted to fit with its surroundings.
If your table of contents contains the words Error! Cannot open file referenced on page after you update it, see "How to Fix Update Problems in Tables," in "Troubleshooting" at the end of this chapter. |
If your table of contents displays incorrect page numbers, see "How to Fix Incorrect Page Numbers in Tables," in "Troubleshooting" at the end of this chapter.