View Single Post
 
Old 10-14-2013, 10:15 PM
macropod's Avatar
macropod macropod is offline Windows 7 32bit 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