A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Mailmerge
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Merging hyperlinks (email link) from excel to word document



 
 
Thread Tools Display Modes
  #1  
Old March 25th, 2010, 08:11 PM posted to microsoft.public.word.mailmerge.fields
darnell
external usenet poster
 
Posts: 1
Default Merging hyperlinks (email link) from excel to word document

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?
  #2  
Old March 25th, 2010, 10:41 PM posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default 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?


 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 08:16 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.