Logo: TechTrax...brought to you by MouseTrax Computing Solutions

Linking to a Figure Number in a Separate Document

by Karen Clark

The INCLUDETEXT field is a handy little tool used to create a link to bookmarked text residing in another Word document. The field looks like this:

{ INCLUDETEXT "SourceDocument.doc" BookmarkName }

But the other day when I tried to link to a figure number in another document, I ran into unexpected problems.

After toiling and slaving for days (<ahem> well, OK, I admit it, <blush> I got help from a newsgroup) I finally got it right! Whoooo-hooooo! I was so darned excited, I could hardly contain myself. (Obviously, I'm quite easily entertained.) Turns out, the answer was a simple switch. Duh.

For readers who may be wondering at this point, "What the heck is she talking about?" let's go through this exercise together step-by-step.

The Scenario
Let's suppose I'm writing a training manual in MS Word. In Chapter 4, I ask the reader to go back to Chapter 2 and review Figure 2-11.

Now, I'm no dummy—I know from past experience that Figure 2-11 may not always be called Figure 2-11. Future edits, such as deleting or adding images, could change the automated figure numbers in Chapter 2. The SEQ (sequential) component of the caption field forces figure numbers to remain in accurate numerical sequence within the document regardless of edits.

I don't want to simply type, "Please refer to Figure 2-11" and then depend on my memory to manually correct that entry when I make changes in Chapter 2. A better solution is to create a link to the figure number in Chapter 2; this link will automatically update whenever changes are made to Chapter 2, and thankfully I won't have to remember a thing.

Let's Define Some Terms
My Word Documents
In this project, I saved the chapters as separate Word documents. I named them:

Chapter1.doc, Chapter2.doc, Chapter3.doc, etc.

Source Document
The document that contains the bookmarked text that will be used in an INCLUDETEXT field in my Target Document.

Target Document
The document that contains the INCLUDETEXT field that will be linked to the bookmarked text in my Source Document.

INCLUDETEXT Field
A field I will place in a specific location in my Target Document, coded to display the bookmarked text from my Source Document. A switch will be added to prevent updating in the Target Document.

Switch
Optional arguments that can be added to a command or field code.

Insert/Caption
This Word function is used to label images. Captions generate automated figure numbers in chronological order within a document. I can tell Word to include the chapter number as part of the caption, too. The captions in my project are placed below each image, and look like this:

Figure 3-1, Figure 3-2, Figure 3-3, etc.

These captions are really field codes. When the field code is toggled, a caption looks like this:

Figure { STYLEREF 1 \s }-{ SEQ Figure \* ARABIC \s 1 }

SEQ
The SEQ component of the caption field code causes figure labels to number in sequence in the document. The sequence will remain in accurate numerical order within the document regardless of changes made to the document.

Okay, Here's How I Created my Link
First, I clicked Tools/Options/View on the menu bar. In the upper Show section of the View Tab, I made sure Bookmarks was checked, and that Field Shading was set to Always. I was then able to see those non-printing characters as I worked.

Then I opened my Source Document (Chapter2.doc) and bookmarked my text (Figure 2-11), like this:

  1. I opened Chapter2.doc and navigated to Figure 2-11:



  2. I selected the text that reads Figure 2-11 by sweeping it with my mouse.

  3. I pressed Alt/I + K on my keyboard to launch a Bookmark Dialog Box:



  4. I typed my bookmark name in the Bookmark name field. I kept it simple! Then I clicked the Add button.



  5. My bookmarked text was then surrounded with brackets, like this:

                 [Figure 2-11]. Product List

  6. I saved and closed Chapter2.doc.

    Then I opened my Target Document (Chapter4.doc) and added an INCLUDETEXT field.
  1. In Chapter4.doc, I navigated to the point where I wanted to place the field:



  2. I pressed Ctrl/F9 on my keyboard to insert field brackets that look like this: { }. My cursor was then blinking in between those brackets.

  3. I typed the following text inside the field brackets:

    { INCLUDETEXT "Chapter2.doc" Products \! }

Here are some important points about the text I just typed:

  • I didn't type the brackets. They were placed there for me when I hit Ctrl/F9. Typed-in brackets will not work!

  • INCLUDETEXT is the field command. It means I want the text from my bookmark to appear here.

  • Next comes Chapter2.doc which is the name of my Source Document (where the bookmark resides). It is surrounded by quotation marks, and I didn't forget to include the .doc extension to the file name within the field code.

    If the Source Document and Target Document do not reside in the same folder, type the entire pathname of the Source Document, using two backslashes wherever you would have otherwise used only one.
    Example:

          { INCLUDETEXT "c:\\Training\\Chapter2.doc" Products \! }

  • Products is the name of my bookmark in the Source Document.

  • The \! is a very necessary switch. Without it, the SEQ field code that resides in the figure number would instruct Word to update the caption by numbering it in sequence in the current (Target) document. The \! switch prevents that from happening, and allows the text to be reproduced as it appears in Chapter 2.

    Remember—I included the \! switch only because the text I brought in contains fields itself. There is no need to add this switch when linking to text that doesn't include any fields.

  • There is a blank space separating the brackets from everything else. Also, there is blank space following the field command, the document name, and the bookmark name.

Getting the Result
After preparing my bookmark in the Source Document, and writing my INCLUDETEXT field in the Target Document, the only thing left to do was to get the result.

  1. I selected the entire field by sweeping it with my mouse. (Alternatively, I could have pressed Ctrl/A on my keyboard to select the entire document.)

  2. I pressed the F9 key on my keyboard. The results are displayed:

Now I can format this entry to make it fit in with my sentence in Chapter 4.

<Big, deep sigh of satisfaction> I can rest assured now, knowing that when I make changes in Chapter 2, this reference in Chapter 4 will automatically update. All is well in my world!

 

 

Go up to the top of this page.

This site powered by the Logical Web Publisher™: Content management by Logical Expressions, Inc.