Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 10-14-2013, 10:15 PM
macropod's Avatar
macropod macropod is offline Inserting an Email Address with hyperlink into a Mail Merge Letter Windows 7 32bit Inserting an Email Address with hyperlink into a Mail Merge Letter Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,525
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

You could insert the email addresses as plain text, then use a macro like the following to convert them (and any web addresses) to clickable hyperlinks post-merge.
Code:
Sub MakeLinks()
Application.ScreenUpdating = False
With ActiveDocument
  With .Range
    With .Find
      .ClearFormatting
      .Replacement.ClearFormatting
      .Text = "<[0-9A-ÿ.\-]{1,}\@[0-9A-ÿ\-.]{1,}"
      .Replacement.Text = ""
      .Forward = True
      .Wrap = wdFindStop
      .Format = False
      .MatchWildcards = True
      .Execute
    End With
    Do While .Find.Found
      .Duplicate.AutoFormat
      .Collapse wdCollapseEnd
      .Find.Execute
    Loop
  End With
  With .Range
    With .Find
      .Text = "http://[! ]{1,}"
      .Execute
    End With
    Do While .Find.Found
      .Duplicate.AutoFormat
      .Collapse wdCollapseEnd
      .Find.Execute
    Loop
  End With
End With
Application.ScreenUpdating = True
End Sub
Depending on your system's regional settings, you may need to replace the three {,} expressions in the code with {;}.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
 

Tags
email address hyperlink

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Inserting an Email Address with hyperlink into a Mail Merge Letter Urgent Supprt Need to Create Mail Merge letter risnasmhd Mail Merge 1 09-29-2013 08:11 PM
Mail Merge Many URLs in one email by common email address instantaphex Mail Merge 3 04-29-2013 05:46 PM
Inserting an Email Address with hyperlink into a Mail Merge Letter Split multi-page mail merge document, then name file from letter info. BriMan83 Mail Merge 1 04-24-2013 11:35 PM
Inserting an Email Address with hyperlink into a Mail Merge Letter Inserting pages at the end of a mail merge morten_lysgaard Mail Merge 3 07-25-2011 11:19 PM
Inserting a Hyperlink and Rich Text in Groupwise Email cksm4 Word VBA 0 03-07-2011 06:33 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 02:16 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