Office Settings & Configuration

Can Word Macro Recorder Record Clicking a Hyperlink?

Algirdas JasaitisAlgirdas Jasaitis Nov 13, 2026 869 views

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.

Can Word Macro Recorder Record Clicking a 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.
Before you start

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.

Solution 1Recommended

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.

1
Open the Visual Basic Editor

In Word or WPS Writer, press Alt+F11 to open the Microsoft Visual Basic for Applications editor.

2
Insert a standard module

In the VBA editor, click Insert > Module to create a new module.

3
Paste the hyperlink macro

Paste the following code into the module: Sub OpenSelectedHyperlink() Selection.Range.Hyperlinks(1).Follow End Sub

4
Run the macro

Close the editor, place the cursor inside the hyperlink text in the document, then press Alt+F8, choose OpenSelectedHyperlink, and click Run.

Use VBA to Follow the Selected Hyperlink in a Macro
Macro opens the hyperlink: The selected hyperlink opens in the default browser without needing the Macro Recorder to capture the click.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS Office download page and download the free installer for your Windows or macOS device.
  2. 2. Install WPS Office: Run the downloaded installer and follow the prompts to complete the installation.
  3. 3. Open the Word document: Launch WPS Writer, click File > Open, and select the .doc or .docx file that contains the hyperlink.
Free, lightweight Office suite with a familiar Word-style user interfaceOpens and saves .doc and .docx files with hyperlinks and formatting intactVBA macro tools let you automate document actions in a Word-compatible environmentSeamless migration from Microsoft Word for daily document work
microsoft office alternative - wps office

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.