logo
search
Document Editing Problems

How to Keep Word Index Page Number Links After Updating

Maira MehtabMaira Mehtab Sep 28, 2026 869 views

Question details

The user needs a method to prevent hyperlinks on index page numbers from disappearing when the index is refreshed.

How to Keep Word Index Page Number Links After Updating
Product
Microsoft Word 2021
Device & OS
Mac (also applies to Windows)
Scenario
Updating a document index to reflect recent pagination changes.
Observed behavior
Updating the index automatically removes previously added hyperlinks on the page numbers, requiring them to be manually recreated.
Before you start

Always save a backup copy of your document before running any VBA macros, as macro actions usually cannot be undone using the standard Undo feature.

Solution 1Recommended

Use a VBA Macro to Restore Index Hyperlinks

Applying a specialized VBA macro will automatically search your index and recreate the missing hyperlinks after a field update.

Because Microsoft Word regenerates the entire field code result when an index is updated, manual formatting and hyperlinks are overwritten. Utilizing a macro script (commonly provided in Microsoft Office Forums) is the most efficient way to restore these links without manually re-adding them one by one.

1
Open the VBA Editor

In your Word document, press 'Option + F11' on a Mac or 'Alt + F11' on a Windows PC to launch the Visual Basic for Applications editor.

2
Insert a New Module

Click 'Insert' in the top menu bar of the VBA editor and select 'Module' to create a blank workspace for your script.

3
Paste the Macro Script

Copy your index hyperlink restoration macro from your trusted source or forum, paste it into the new module window, and then close the VBA editor.

4
Run the Macro

Return to your Word document, navigate to the 'View' tab, click on 'Macros', select the macro you just pasted, and click 'Run' to restore your index links.

Use a VBA Macro to Restore Index Hyperlinks
Macro Security Settings: You may need to adjust your macro security settings in Word Preferences (Mac) or Trust Center (Windows) to allow custom macros to run safely.
Free Microsoft Office alternative

Try WPS Office for Seamless Document Editing

If you frequently struggle with complex macro workarounds and field code limitations in Microsoft Word, consider switching to WPS Office. It provides a lightweight, highly compatible, and user-friendly environment for professional document editing without the steep learning curve or high costs.

  1. 1. Download WPS Office: Visit the official WPS website and download the installation package for your Mac or Windows computer.
  2. 2. Install the Software: Run the downloaded installer and follow the on-screen prompts to set up WPS Office on your device.
  3. 3. Open Your Document: Launch WPS Writer and open your existing .docx files to enjoy seamless editing and formatting without missing a beat.
Fully compatible with Microsoft Word (.docx) and older formatsLightweight architecture ensures fast load times on both Mac and PCIntuitive built-in tools for generating and updating tables of contents and indexesFree to download and use for essential document processing tasks
microsoft office alternative - wps office

Frequently Asked Questions

Why do hyperlinks disappear when I update my Word index?

When Word updates an index, it completely regenerates the field code results from scratch. This standard regeneration process overwrites any manual formatting, including custom hyperlinks, that you applied to the text after the index was initially generated.

Can I lock the index field to prevent links from being removed?

Yes, you can select the index and press 'Cmd + F11' on Mac (or 'Ctrl + F11' on Windows) to lock the field. However, doing this prevents the index from updating at all, meaning it won't reflect new pagination changes until you unlock it with 'Cmd + Shift + F11'.

Will this macro solution work on both Mac and Windows versions of Word?

Yes, standard VBA macros for Word generally function across both Mac and Windows operating systems. You simply need to ensure that macro execution is enabled within your software's security preferences or Trust Center.