A family of Microsoft word processing software products for creating web, email, and print documents.
You will undoubtedly find that the Index will not retain the hyperlinks added by your macro. As soon as you do anything that causes the Index to refresh (e.g. a print preview or printing the document), all the hyperlinks will disappear. That's because the Index in Word is a field. The only way around that would be to unlink the Index field, to prevent it updating, before applying the hyperlinks. But then the Index would be incapable of any further updates. Even in a document that's no longer subject to ongoing edits, that could in some cases mean the index entries will reference the wrong page #s as soon as you open the document on another computer - or even on the same computer - with a different active printer. That's because Word uses information from the active printer's driver for layout optimisation.
Furthermore, adding hyperlinks from an Index to the corresponding entries in the body of the document won't work unless you duplicate the entries for all those case where there is more than one XE field for the same index entry on a given page (a page that can change as soon as you change printer drivers). That's because Word intelligently combines duplicates into a single Index field entry but a hyperlink can only go to one of those entries. This also explains why criticizing Word for not hyperlinking to entries shows a fundamental lack of understanding of what an Index is and how difficult it would be to manage such an arrangement in a document subject to ongoing edits and/or viewing on computers using different printer drivers.
It's all very well to carry on about how page layout programs can link an Index to a page as some contributors to this thread have done, but page layout programs don't have the ability to optimise a document's layout the way Word does to accommodate changes in printer drivers - and automatically update Tables of Contents, Indexes, Cross-references and the like to take account of that.