RE: TOC in Word 2007 for Multiple Files

Subject: RE: TOC in Word 2007 for Multiple Files
From: Fred Ridder <docudoc -at- hotmail -dot- com>
To: <ltc -dot- writer -at- comcast -dot- net>, <techwr-l -at- lists -dot- techwr-l -dot- com>
Date: Fri, 20 Aug 2010 19:37:54 -0400

Tim Lewis wrote:
> I have been working on some older manuals for some clients that were written
> in Word. These manuals are 200 to 400+ pages long when put together as PDFs.
> Combining all the files for a manual into one file in Word just causes too
> many problems and I know that in the earlier versions of Word, Master
> Documents did not work. I need to generate a Table of Contents at the front
> of a manual for every file in the manual. How do you do that?

It's actually pretty easy to do using RD fields, which for some inexplicable reason are no longer documented in Word's help system as of Word 2007. The RD (referenced document) field tells Word to build any comiled content (TOC, LOT, LOF, index) that is in the same file using the headings (or captions or index entry codes) found in the file designated in the field code. If you include a series of RD fields for all the chapter files in the proper order, Word will build the TOC from those files just as if all those chapter files were actually contained in the same file as the TOC.
Here are the steps:

1) Create a file that will contain the TOC (and LOF and LOT, assuming you want those, too). It can also contain your title page and any other front matter you need to include in the composite document. I'll refer to this as the front matter file in the rest of these instructions.
2) At the bottom of the front matter document, include a series of RD fields that reference each of the chapter files in order.
To do this from the keyboard:

Press Ctrl+F9 to insert an empty field code object
Type RD followed by a space inside the field code brackets
Type (or paste) the path and filename of the appropriate chapter file enclosed in quote marks
If the chapter file is in the same directory as the frontmatter file or if you only provide a partial path (i.e. a path relative to the location of the frontmatter file) type a space then a backslash and the letter "f" following the quoted fielname. If you have provided an absolute path to the file, omit the \f switch.
Repeat for each chapter file

Alternatively, you can use the Quick Parts>Field command on the Insert ribbon instead of Ctrl+F9. Note that you *cannot* directly type the curly braces to enclose the filed code; the command for inserting field codes imbues the brackets with voodoo that you cannot apply manually.

When you're done, you'll wind up with something that resembles the following:

{ RD “Introduction+References.docx” \f }
{ RD “Requirements.docx” \f }
{ RD “Architecture.docx” \f }
{ RD “System_Boot.docx” \f }
{ RD “System_Initialization.docx” \f }
Note that these will display with a dotted line under the text because they are automatically formatted as hidden.
3) Click the Office bubble and then the Word Options button (at the bottom of the window). Choose the Display properties and deselect the options for "Hidden text" and "Show all formatting marks", and make sure that "Print hidden text" is also deselected. This hides the RD field codes so that they won't affect the pagination.
4) Place the insertion point where you want the TOC to appear. Click Table of Contents on the References ribbon to insert the field code for the TOC. Word automatically scans each of the referenced files and builds the TOC.
5) Place the insertion point where you want the LOF and/or LOT to appear and then click the Insert Table of Figures button on the References ribbon and use the dialog to set up and build the LOF or LOT, as appropriate.
6) Pat yourself on the back.

Fred Ridder

Gain access to everything you need to create and publish information
through multiple channels. Your choice of authoring (and import)
formats with virtually any output. Try Doc-To-Help free for 30-days.

LavaCon 2010 in San Diego Sept 29 - Oct 2 is now open for registration.
Use referral code TECHWR-L for $50 off conference tuition!
See program at:

You are currently subscribed to TECHWR-L as archive -at- web -dot- techwr-l -dot- com -dot-

To unsubscribe send a blank email to
techwr-l-unsubscribe -at- lists -dot- techwr-l -dot- com
or visit

To subscribe, send a blank email to techwr-l-join -at- lists -dot- techwr-l -dot- com

Send administrative questions to admin -at- techwr-l -dot- com -dot- Visit for more resources and info.

Please move off-topic discussions to the Chat list, at:


TOC in Word 2007 for Multiple Files: From: Tim Lewis

Previous by Author: Chinese or Latino Web Usability
Next by Author: Re: Anyone have an idea?
Previous by Thread: RE: Problem with Word 2007 x-refs
Next by Thread: RE: TOC in Word 2007 for Multiple Files - Summary

What this post helpful? Share it with friends and colleagues:

Sponsored Ads