Automatic hyperlinks to headings... ?



Hi all,

This is my first post to this (or any MS Word) newsgroup, so I have no
idea if this is a FAQ or an RAQ. Please bear with me, and I hope that
someone can provide a solution for my peculiar problem. I'm trying to
present a clear picture of my current situation to you.

Current Environment : MS Word 2000 (Though I have access to Word XP, if

Situation : I have a large word document (1000+ pages) to which I have
applied heading styles and generated a TOC based on that. I have two
styles - Heading1 which is the chapter heading and BodyText which is
the chapter content. I have certain terms sprinkled throughout the
chapter content which need to hyperlink to respective chapter heading
pages, wherever they may be.

Example :
Sample Document starts =================

Chapter 1
This is a very good chapter.....

Chapter 2
If you thought [Chapter 1] *** Need to hyperlink here *** was good,
this chapter is going to be be awesome...
.... *** More hyperlinks ***

Chapter 3
If you thought [Chapter 2] *** Need to hyperlink here *** was awesome,
this chapter is going to be be spellbinding...
.... *** More hyperlinks ***

================= Sample Document ends.

Problem :
So, basically, the problem is that I need a way to parse the entire
document, searching for text that matches one of the Headings, setting
it to hyperlink to that particular heading.

I suppose I'll have to use VBA to do this, unfortunately, I'm not too
strong with VBA. But I should be able to follow a step by step
solution, if any. I'm thinking if I could do a search / replace with MS
Word field codes, then it might work ? Or are there any pre-made
solutions that do just this...

TIA for any inputs.



Suzanne S. Barnhill

You can insert cross-references as hyperlinks. Insert | Reference |
Cross-reference to Heading: Insert as hyperlink.

Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

Email cannot be acknowledged; please post all follow-ups to the newsgroup so
all may benefit.




Thank you for your responses.

The problem is that even if I do use Cross-references, how will I do it
3000-4000 times in a 1000 page document ? I will need to do this
through VBA. My elementary efforts with VBA have only allowed me to
obtain an array of all the headings in the document. Now I wish to
iterate through this array, search for each item, throughout the
document and replace it with a field that links to the heading with the
same text.

Please help...

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question