Need hyperlinks index entries in word 2007

Anonymous
2010-01-30T14:25:46+00:00

Hi All,


I am trying to find a way to get the page numbers in a Word 2007 generated index to contain hyperlinks to the corresponding content in the document. So far I haven't been able to find a way to do this. 

Web searches seem to suggest this could be done with a macro, but that is beyond my skill level. I was wondering if anyone had any other suggestions, or knows of a pre-existing macro I could use to achieve this.


Thanks


Neil


Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

48 answers

Sort by: Newest
  1. Paul Edstein 82,871 Reputation points Volunteer Moderator
    2016-09-28T23:36:17+00:00

    I would also like to see an hyperlinked index in Word.

    If you would like to see a change in the way something works, you could make a suggestion for a change at http://word.uservoice.com/. MS doesn't actively monitor posts in this forum for possible product improvements.

    Do be aware, too, that MS is unlikely to change the behaviour for any existing Word version.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2016-09-28T19:40:00+00:00

    I would also like to see an hyperlinked index in Word. It is hard to believe that Microsoft is not able to integrate this. As soon you have the page numbers, an index is not different from a table of contents which supports a hyperlinks. I need the index system for PDF creation.

    Google gave me a link to a product. The website looks good but I don't have any experience with this:

    http://www.editorium.com/IndexLinker.htmDoes someone has experience with this? $50 bugs it not an issue but wasting time with non-working product is depressing.
    

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-09-12T06:17:49+00:00

    Hi Paul

    maybe I explained not clearly enough: I do use cross references like this code

        Selection.InsertCrossReference ReferenceType:="Textmarke", ReferenceKind:= _

          wdPageNumber, ReferenceItem:=Index1(j).bm, InsertAsHyperLink:=True, _

          IncludePosition:=False, SeparateNumbers:=False, SeparatorString:=" "

    (Textmarke=Bookmark in german, Index1(j).bm is the member of my array with represents the bookmark.

    The blue font like hyperlinks ist realized by changing the color ;-)

    For the moment that is ok, but I will deal with your suggestion the next days and give you feedback.

    Thank you

    Best regards

    Thomas

    Was this answer helpful?

    0 comments No comments
  4. Paul Edstein 82,871 Reputation points Volunteer Moderator
    2016-09-12T05:27:02+00:00

    Instead of using the .Hyperlinks.Add method, which it seems likely to be the case, you would probably get better results with cross-references to your bookmarks, which you can do using the .Fields.Add method. By including the "\h" switch as part of the Text argument, the cross-reference will both hyperlink to the source and auto-update to reflect pagination changes (which hyperlinks won't do) without imposing the blue underlined font typical of hyperlinks. That will at least give you one less issue to deal with.

    The code for the .Fields.Add method might be implemented along the lines of:

    ActiveDocument.Fields.Add Range:=Rng, Type:=wdFieldPageRef, Text:=StrBkMk & " \h", PreserveFormatting:=False

    where Rng is a Range variable defining the location you want to insert the cross-reference at an StrBkMk is a string variable holding the bookmark's name. These are arguments you would already be using for the Hyperlinks.Add method's Anchor & SubAddress, respectively.

    Was this answer helpful?

    0 comments No comments
  5. Anonymous
    2016-09-12T04:31:48+00:00

    Hi Paul

    "my" index is not an index, but a collection of hyperlinks to bookmarks, written by the macro, and they are updatable very well (If there is a new page, my layout has changed or something like that). The link is okay, even if the shown pagenumber not, and the hyperlinks are still there.

    And if I refresh the document, the pagenumber is updated, so the link and the pagenumber are ok both afterwards.

    But surely: "My" index is not updated automatically but must be written newly by starting the macro after creating a new XE-entry.

    the second problem is one: my macro does not like double XE-fields. That is important, i forgot that problem - in the moment I am happy, having an hyperlinked index and have to look that there will be no double index. "my" macro was a development for this one document I am creating just now and which will be a digital pdf at the end (and a printed on paper too).

    Thank you for your justified objection in this case, perhaps I can avoid the problem by numbering the bookmarks for double indexentries when going thru the document, creating the bookmarks. And when writing the index, I should look in VBA whether there is a double index-entry.

    And "My" index is not pretty, that is why I am blaming word for not having a hyperlinked index - the word index is much much much better. But as I am coding very little - I can expect from a company with thousands of experienced programmers, that they will solve a problem, which open since many years. even if it is difficult :-)

    Best regards

    Thomas Keller

    Was this answer helpful?

    0 comments No comments