How to Fix Nested Fields in Word Dynamic Hyperlinks
Question details
The user is trying to create dynamic hyperlinks using nested fields but finds that DOCPROPERTY fields nested inside a HYPERLINK field are being automatically removed.

- Product
- Word Processor
- Device & OS
- Windows and Mac
- Scenario
- Attempting to generate dynamic links in a document using nested document properties within hyperlink fields.
- Observed behavior
- The nested DOCPROPERTY field is stripped out of the HYPERLINK field, causing the hyperlink to revert to its original static URL.
Press Alt + F9 (or Option + F9 on Mac) to toggle field codes on in your document so you can accurately view and edit the underlying HYPERLINK and nested field syntax.
Use a Mail Merge Hyperlink Approach
Instead of nesting DOCPROPERTY fields, which often break, use mail merge fields combined with the HYPERLINK field to reliably create dynamic URLs.
Nesting DOCPROPERTY fields directly inside a HYPERLINK field is a known limitation in many word processing versions, causing the field to revert to a static link. Transitioning to a mail merge setup resolves this by cleanly injecting dynamic data into the link structure.
Press Alt + F9 to reveal all field codes in your document so you can see the HYPERLINK formula.
Delete the nested DOCPROPERTY code and insert a standard MERGEFIELD that points to your dynamic URL data source.
Ensure your syntax looks similar to { HYPERLINK "{ MERGEFIELD URL_Field }" }. Make sure to use Ctrl + F9 to insert the curly brackets for the fields.
Delete any \* MERGEFORMAT text from your field codes, as these switches can interfere with dynamic link generation.
Press Alt + F9 again to hide the field codes, select the hyperlink, and press F9 to update the field and test the dynamic URL.

Adjust Display Text and Relative Paths
Ensure the display text and relative path syntax are correctly configured so the hyperlink functions properly and displays the desired text to the reader.
Create Dynamic Hyperlinks Easily with WPS Office
WPS Writer simplifies the creation of dynamic links through its robust Mail Merge features, allowing you to bypass complex nested field issues found in other word processors while maintaining full document compatibility.
- 1. Open your document in WPS Writer: Launch WPS Office and open your existing document or start a new one.
- 2. Access the Mail Merge features: Navigate to the Mailings tab on the top ribbon and click on Open Data Source to connect your dynamic URL data.
- 3. Insert a dynamic hyperlink: Use the Insert Merge Field button to place your URL data directly into the document, easily formatting it as a hyperlink without relying on fragile nested codes.

Frequently Asked Questions
Why does my nested DOCPROPERTY disappear inside a hyperlink?
In many word processor versions, nesting a DOCPROPERTY field directly inside a HYPERLINK field causes the field code to break during document updates. The application automatically strips the nested property to resolve the conflict, which causes the link to revert to its original static URL.
How do I view the underlying hyperlink field codes?
You can reveal the hidden field codes in your document by pressing Alt + F9 on Windows or Option + F9 on a Mac. This allows you to manually read and edit the raw HYPERLINK and MERGEFIELD syntax.
What does the MERGEFORMAT switch do in a hyperlink field?
The \* MERGEFORMAT switch instructs the word processor to retain the previous formatting of the field whenever it is updated. However, in complex nested hyperlinks, it can cause formatting conflicts and is generally recommended to be removed.
Can I use specific display text for a mail merge hyperlink?
Yes, you can set a literal display text for your dynamic hyperlink. This text is managed in the Insert Hyperlink dialog box and remains visible to the reader even when the underlying dynamic field codes are hidden.




