Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 04-18-2014, 10:57 PM
macropod's Avatar
macropod macropod is offline Convert html links into embedded hyperlinks Windows 7 32bit Convert html links into embedded hyperlinks Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,536
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

FWIW, the previous discussion in this thread has been predicated on a mailmerge outputting hyperlink string as <a href...></a> tagged text. The underlying assumption seems to have been that Word can't generate mailmerge hyperlinks with: (a) different targets; (b) different targets from their display text; and/or (c) a different display text for each hyperlink. For a mailmerge outputting its results to a document, neither of the first two assumptions is valid for any Word version and third isn't valid for Word 2007 & later. The assumption may valid be for emails (I haven't tested it) and doesn't apply for merges to print.

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, which is terribly useful when different hyperlink addresses are involved. That may be where the first two assumed limitations come from. 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.
4. Select the field and press F9 to update the display.

In Word 2007 & later, you can make the display text variable also, by following these additional steps:
5. Position the cursor anywhere within the display text.
6. Insert a mergefield pointing to whatever data field you want to use for the display text (this could even be the same field as used at step 3 above).
7. Delete all of the previous display text either side of your last-inserted mergefield (note that this field will likely have updated already).
8. Execute the merge.
9. After merging to a new document, use Ctrl-A, F9 to update all fields. Without this, the mergefield hover text won’t update to the correct targets.
None of the above requires a macro to implement.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
a href, hyperlink, macro



Similar Threads
Thread Thread Starter Forum Replies Last Post
Convert html links into embedded hyperlinks Embedded links spheon Word 1 06-07-2011 04:11 PM
convert html to text at opening etfjr Word 0 12-13-2010 11:14 AM
Can you actually write HTML and CSS in a word document and send it as an html page jackaroo Word 0 07-12-2010 07:49 AM
Word with frames, table of contents, and hyperlinks to html NHMC Word 0 12-09-2009 12:54 PM
Convert a file from HTML to WORD format weblayout view gtselvam Word 0 12-02-2008 03:53 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:54 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2026 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft