How to Add Hover Text to Every Occurrence of a Word in Microsoft Word
Question details
The user needs to automatically insert a glossary-style tooltip or hover text for every occurrence of a specific term throughout a Word document to avoid manual repetitive work.

- Product
- Microsoft Word
- Device & OS
- not provided
- Scenario
- Creating an interactive glossary or adding explanatory tooltips to repeated technical terms within a large document.
- Observed behavior
- Microsoft Word's standard Find and Replace feature cannot directly insert dynamic fields like an AutoTextList across all occurrences simultaneously.
Because this procedure involves running a VBA macro that actively replaces text throughout your document, always create a backup copy of your file first to prevent unintended formatting changes.
Automate Hover Text Insertion using AutoTextList and a VBA Macro
Save your desired tooltip as a Building Block and use a custom VBA macro to automatically replace all instances of the target word with this saved field.
Since Word's default Find and Replace tool does not support the direct insertion of complex field codes like AutoTextList, you must first define your hover text as a reusable Building Block (AutoText). Once saved, a VBA script can seamlessly loop through the document and insert this block at every matching occurrence.
Press Ctrl+F9 in your document to insert blank field brackets. Inside the brackets, type: AutoTextList "TargetWord" \s NoStyle \t "Your explanatory hover text here".
Right-click on the newly typed field code and select 'Update Field' from the context menu so it displays as normal text.
Highlight the updated word, press Alt+F3 to open the 'Create New Building Block' dialog box, name your entry (e.g., 'HoverTerm'), and save it to the AutoText gallery.
Press Alt+F11 to launch the Visual Basic for Applications (VBA) Editor. Go to Insert > Module to create a blank script window.
Write a script that executes a Find loop for your target word, selecting each match and replacing it by inserting the 'HoverTerm' AutoText entry. Press F5 to run the macro across the document.

Try WPS Office for a Streamlined Document Editing Experience
If you frequently encounter limitations with complex formatting, macros, or repetitive tasks in Microsoft Word, consider switching to WPS Office. It provides a lightweight, highly compatible, and user-friendly alternative for all your document creation and editing needs.
- 1. Download and Install: Visit the official WPS website to download and install the free WPS Office suite on your computer.
- 2. Open Your Document: Launch WPS Writer and open your existing .docx files directly without any conversion steps.
- 3. Edit Efficiently: Enjoy a familiar, streamlined interface to manage your document's text, styles, and advanced layouts.

Frequently Asked Questions
Can I use the standard Find and Replace tool to add tooltips in Word?
No, the standard Find and Replace dialogue does not support inserting active AutoTextList fields or complex building blocks natively. You must use a VBA macro to automate this specific replacement.
What is an AutoTextList field?
An AutoTextList is a hidden field code in Microsoft Word that allows you to display a specific word which, when hovered over with the mouse cursor, reveals a small tooltip box containing additional text. It is often used for digital glossaries.
How do I view the hover text once it is applied?
Once the AutoTextList field is updated and active, simply move your mouse cursor over the designated word in the document, and wait a second. A small tooltip box will appear displaying your hidden text.
Will running a VBA macro affect my document's existing formatting?
Replacing text via a VBA macro can sometimes reset local formatting applied to specific words. It is highly recommended to test the macro on a copied version of your document first to ensure your original formatting remains intact.




