can merge field be clickable to "write mail" box?

R

rnelson696

We have a letter to email in MSWord XP which has merge fields, merged i
from a delimited text file.

One of the merge fields is an email address. We would like that fiel
to be clickable to open a “write mail” box to the e-address in tha
merge field. We have not been able to get that to work.

Often it repeats the email address in the first record in all th
records.

Possible solutions
 
D

Doug Robbins - Word MVP

If you run the following macro, it will convert text in the form of an email
address into a clickable address:

Dim myrange As Range
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
Set myrange = Selection.Range
myrange.Hyperlinks.Add Anchor:=myrange, Address:="Mailto: " &
myrange
Loop
End With


--
Please post any further questions or followup to the newsgroups for the
benefit of others who may be interested. Unsolicited questions forwarded
directly to me will only be answered on a paid consulting basis.

Hope this helps
Doug Robbins - Word MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top