Hello guys. Does anyone know how to create an expandable hyperlink in MS Word?

Dani AI

Generated

linked an Office help page and clarified the goal: a clickable "read more" that hides or reveals part of a Word document. Word does not provide a single built-in hyperlink that expands arbitrary inline text in every view, but there are three practical approaches depending on the target audience and delivery format.

If the text can be organized under headings, use Word's collapsible headings (apply a built-in Heading style; small triangle appears to collapse/expand in Word 2013+). This is the simplest, requires no macros, and works well for structured documents. Microsoft explains the feature here: .

For a true "click to show/hide" control inside a document, use a small VBA macro that toggles a bookmarked range between hidden and visible, then trigger it from a shape or a MACROBUTTON field. Save the file as a macro-enabled document (.docm) and inform recipients about macros. Example macro (wrap the text to hide in a bookmark named "hiddenText"):

Sub ToggleHiddenText()
    If ActiveDocument.Bookmarks.Exists("hiddenText") Then
        With ActiveDocument.Bookmarks("hiddenText").Range.Font
            .Hidden = Not .Hidden
        End With
    End If
End Sub

If the final output will be HTML, saving the document as a web page and using native HTML collapse elements (for example, the <details> element) is easier; see the HTML details element docs: details — MDN Web Docs.

Caveats: macros require .docm and user trust; collapsible headings are Word-specific and may not survive conversion to PDF or other viewers. For sharing, pick the method that matches how recipients will open the file.

Recommended Answers

All 2 Replies

Is this what you're looking for? (Third item in list)

(May the Google be with you!)

Is this what you're looking for? (Third item in list)

(May the Google be with you!)

I need to have a read more expandable link to show hidden text.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.