Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #9  
Old 10-29-2014, 03:25 PM
macropod's Avatar
macropod macropod is offline Help with display text for URLs in template Windows 7 64bit Help with display text for URLs in template Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Try replacing the code you posted with:
Code:
ActiveWindow.View.ShowFieldCodes = True
With Selection
  ' URL
  ActiveDocument.Hyperlinks.Add Anchor:=.Range, Address:="|", TextToDisplay:="Print Item"
  .Move Unit:=wdCharacter, Count:=-4
  .End = .End + 1
  ActiveDocument.MailMerge.Fields.Add Range:=.Range, Name:="Website_URL"
  .EndKey Unit:=wdLine
  .TypeText " / "
  .EndKey Unit:=wdLine
  ' TEXT LINK URL
  ActiveDocument.Hyperlinks.Add Anchor:=.Range, Address:="|", TextToDisplay:="Text Link"
  .Move Unit:=wdCharacter, Count:=-4
  .End = .End + 1
  ActiveDocument.MailMerge.Fields.Add Range:=.Range, Name:="Text_Link"
End With
ActiveDocument.Fields.Update
ActiveWindow.View.ShowFieldCodes = False
Note: This should also obviate the need for the macro I posted before.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with display text for URLs in template Not press F9 to refresh URLs? ASW122 Mail Merge 5 07-14-2014 09:35 PM
How do MS Office products link to URLs? stegraham Office 2 10-22-2013 04:52 AM
Help with display text for URLs in template URLs in citations acappella Word 3 07-24-2012 03:28 PM
Template does not display in Installed Templates JimH Word 1 02-01-2012 11:59 AM
mailmerge with custom URLs? guthrie Mail Merge 0 03-06-2011 08:39 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 08:48 PM.


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