Can Word Macro Recorder Record Clicking a Hyperlink?
Question details
The user wants to automate opening an absolute hyperlink in Word 2010 and needs to know whether the Word Macro Recorder can capture clicking or right-clicking the hyperlink.

- Product
- Microsoft Word 2010 / WPS Writer
- Device & OS
- not provided
- Scenario
- The user is recording a macro to open an absolute hyperlink but cannot click or right-click the hyperlink while the Macro Recorder is running.
- Observed behavior
- The Macro Recorder does not capture hyperlink click or right-click actions, so the recorded macro does not include the command to open the hyperlink.
Open the document that contains the hyperlink and enable the Developer tab in Word or WPS Writer so you can access macro and VBA tools.
Use VBA to Follow the Selected Hyperlink in a Macro
Use this when the Macro Recorder cannot capture clicking a hyperlink and you need the macro to open the selected link programmatically.
The Word Macro Recorder only captures a subset of user actions. Hyperlink clicks and right-click context menu actions are not recorded, so the reliable way is to call the hyperlink's Follow method from VBA.
In Word or WPS Writer, press Alt+F11 to open the Microsoft Visual Basic for Applications editor.
In the VBA editor, click Insert > Module to create a new module.
Paste the following code into the module: Sub OpenSelectedHyperlink() Selection.Range.Hyperlinks(1).Follow End Sub
Close the editor, place the cursor inside the hyperlink text in the document, then press Alt+F8, choose OpenSelectedHyperlink, and click Run.

Use FollowHyperlink for a Known Absolute URL
Use this if the absolute hyperlink address is already known and you want a simple macro that opens that URL without relying on document selection.
Use WPS Office as a Free, Word-Compatible Alternative for Document Macros
WPS Office is a free, lightweight Office alternative that opens Microsoft Word documents with familiar formatting and menus, so you can continue working with hyperlinks and macros in a Word-like environment while avoiding Microsoft Office limitations.
- 1. Download WPS Office: Visit the official WPS Office download page and download the free installer for your Windows or macOS device.
- 2. Install WPS Office: Run the downloaded installer and follow the prompts to complete the installation.
- 3. Open the Word document: Launch WPS Writer, click File > Open, and select the .doc or .docx file that contains the hyperlink.

Frequently Asked Questions
Can the Word Macro Recorder record clicking a hyperlink?
No. Word's Macro Recorder does not capture every user action, and hyperlink clicks or right-click actions are not recorded. Use VBA such as Selection.Range.Hyperlinks(1).Follow to open the hyperlink.
How do I enable the Developer tab for macro work?
In Word or WPS Writer, go to File > Options > Customize Ribbon, check Developer in the right pane, and click OK.
Does Selection.Range.Hyperlinks(1).Follow work in WPS Writer?
In WPS Writer with VBA support, the same code can be run from the VBA editor. Place the cursor inside the hyperlink before running it so the selection range contains the hyperlink.
What can I do if I only need to open a fixed URL?
Use FollowHyperlink with the absolute address in a macro, for example: ThisDocument.FollowHyperlink Address:="https://www.example.com", NewWindow:=True.
Why can I right-click a hyperlink normally but not while recording?
The Macro Recorder is designed to capture certain commands, not all mouse actions. It does not record right-click context menu actions for hyperlinks, so the action is missing from the macro.




