Merging hyperlinks (email link) from excel to word document
Running the following macro over the result of the mail merge will convert
the email addresses back to "hot links"
Selection.HomeKey Unit:=wdStory
Selection.Find.ClearFormatting
With Selection.Find
Do While .Execute(FindText:="[+0-9A-z._-]{1,}\@[A-z.]{1,}", _
MatchWildcards:=True, Wrap:=wdFindStop, Forward:=True) = True
Selection.Hyperlinks.Add Selection.Range, Selection.Text
Selection.Collapse wdCollapseEnd
Loop
End With
--
Hope this helps.
Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.
Doug Robbins - Word MVP, originally posted via msnews.microsoft.com
"darnell" wrote in message
...
When merging cells containin active hyperlinks for email to a word
document
the links are not merged as hot links. Is there a way to designat the
merge
code to retain the hot link for the email address or some other way to
keep
these active?
|