Share via

Insert variable hyperlinks with variable displayed text in mail merge

Anonymous
2012-02-02T12:12:02+00:00

Hello,

I need to do a merge mail with some hundred recipients but I have a problem that I could not solve by searching in different platforms for a solution:

I need to insert variable hyperlinks to the document displaying a variable text for each recipient. I am using an excel document to insert the data.

Example:

Displayed Text: Ticketcode1

Hyperlink: www.123.de

I do know some basic stuff about macros, etc  but nothing too deep... It would be so nice if anyone can help me with this shortly!

Thanks a lot! :)

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
2012-02-03T09:33:18+00:00

Hi Paul,

I haven't tried it, but the method in the following link supposedly allows you to have variable display text for each record:

http://help.lockergnome.com/office/Active-hyperlinks-mail-merge--ftopict1007679.html

--
Hope this helps.

Doug Robbins - Word MVP,
Email: dkr[atsymbol]mvps[dot]org
Posted via the Community Bridge

"macropod [MVP]" wrote

You can't have variable display text for mailmerge hyperlinks, but you can have a constant display text with variable hyerlink destinations.

Was this answer helpful?

0 comments No comments

8 additional answers

Sort by: Most helpful
  1. Anonymous
    2012-02-03T10:48:25+00:00

    First of all: Thanks Doug, this is a great help and it does work for me!

    As for macropod: In Word 2010 it works without a problem if you do as is said in the description and after merging to a new document prest ctrl-a to select everything and then update with F9 the hyperlink changes to the one matching the displayed text!

    Was this answer helpful?

    0 comments No comments
  2. Paul Edstein 82,861 Reputation points Volunteer Moderator
    2012-02-03T10:16:34+00:00

    I haven't tried it, but the method in the following link supposedly allows you to have variable display text for each record:

    http://help.lockergnome.com/office/Active-hyperlinks-mail-merge--ftopict1007679.html.

    Hi Doug,

    While it seems the technique does allow you to vary the display text in Word 2007 & later, my testing with Word 2010 shows that it locks you into a single url for all records (ie steps 4-8 don't seem to work as claimed). I've found it also doesn't work at all with Word 2003 & earlier - the hyperlinks are lost and only the unformatted display text remains. My solution varies the url but allows the user to choose the common display text - and it works with all Word versions.

    Was this answer helpful?

    0 comments No comments
  3. Paul Edstein 82,861 Reputation points Volunteer Moderator
    2012-02-02T21:54:17+00:00

    Hi Lisaeck,

    You can't have variable display text for mailmerge hyperlinks, but you can have a constant display text with variable hyerlink destinations.

    By default, if you insert a mailmerge field into a hyperlink field, the hyperlinks will all show the first record’s address as the 'Text to display' text. Here's how you can do get a mailmerge to display your preferred default 'Text to display' text instead:

    1. Disregarding mergefield issues for the moment, insert a hyperlink into the document in the normal way, choosing whatever 'Click Here' text you want in the 'Text to display' box.
    2. Select the inserted hyperlink and press Shift-F9 to expose its field code
    3. Replace everything in the field after 'HYPERLINK' with your mergefield.

    Was this answer helpful?

    0 comments No comments
  4. Doug Robbins - MVP - Office Apps and Services 323.1K Reputation points MVP Volunteer Moderator
    2012-02-02T20:28:28+00:00

    If the text of the hyperlink is there, but it does not appear as a hyperlink, run a macro that contains

    Sub ApplyHyperlinks()
    ActiveDocument.Range.AutoFormat
    End Sub

    You may also want to take a look at the following articles:

    http://support.microsoft.com/kb/912679

    and/or

    http://help.lockergnome.com/office/Active-hyperlinks-mail-merge--ftopict1007679.html

    --
    Hope this helps.

    Doug Robbins - Word MVP,
    Email: dkr[atsymbol]mvps[dot]org
    Posted via the Community Bridge

    "Lisaeck" wrote I need to insert variable hyperlinks to the document displaying a variable text for each recipient. I am using an excel document to insert the data.

    Was this answer helpful?

    0 comments No comments