bottom
Great WordTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > WordTips Home > Tools > Hyperlinks in an Index

Hyperlinks in an Index

Summary: How to establish a hyperlink between an index and the text in a Word document. (This tip works with Microsoft Word 97, Word 2000, Word 2002, and Word 2003.)

Subscriber Beth Hunter recently asked if it was possible to establish hyperlinks between index entries and the text they reference, just as you can between TOC entries and the headings they reference.

The results are unanimous, Beth--you can't do this in Word. (If it is any consolation, everyone agreed that it makes sense to have this capability.) This means that your only solution is to write your own macro to do such cross-linking. Creating such a macro would be fairly complex, however. You can either write a macro that will examine the index and create the hyperlinks in one pass, or you can write a macro that will look up a reference from the index on the fly.

If you choose the latter route (doing it on the fly), you can find additional helpful information at Microsoft's Web sites. Specifically, Cindy Meister wrote a series of three articles on Word fields that provides a solution. Check out these links:

http://msdn.microsoft.com/library/periodic/period00/WordFieldsPartI.htm
http://www.officevba.com/features/2000/05/vba200005cm_f/vba200005cm_f.asp
http://www.officevba.com/features/2000/06/vba200006cm_f/vba200006cm_f.asp

The last link provides the most "meat" that is applicable to the question at hand. Using the information in these articles you could create a macro that recognizes when someone double-clicks in an index. A macro then gleans the word being double-clicked, gets the page number for the entry, goes to that page, and finds the word. As you can imagine, this is no trivial macro. It works nicely but involves writing a class module to handle the event and only works for Word 2000 or later.

Tip #1526 applies to Microsoft Word versions: 97 | 2000 | 2002 | 2003


Great Idea! Uncover the many ways you can master the full potential of printing your documents. WordTips: Printing and Printers can help you get the most from both the printed page and your printer.

Helpful Links

Ask a Word Question
Make a Comment

Tips.Net Home
Vital News Home

WordTips FAQ
WordTips Premium

Learn Access Now

Beauty Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
WordTips Site

 

Great Info!

Get tips like this every week in WordTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)