Thread: hyperlinks
View Single Post
  #3   Report Post  
David McRitchie
 
Posts: n/a
Default

Here is the macro

Sub mailto_Selection()
Dim Email As String, Subj As String, cell As Range
Dim response As Variant
Dim msg As String, url As String
Email = "" 'create list below
Subj = "Family Newsletter"
msg = "Dear Family,"
' -- Create the URL
For Each cell In Selection
Email = Email & cell.Text & "; "
Next cell
url = "mailto:" & Email & "?subject=" & Subj & "&body=" _
& Replace(msg, Chr(10), "/" & vbCrLf & "\")
MsgBox url
url = Left(url, 2025) 'was successful with 2025 , not with 2045
' -- Execute the URL (start the email client)
ShellExecute 0&, vbNullString, url, vbNullString, vbNullString, vbNormalFocus
End Sub

A1:
A2:

A3:

A4:

A5: Dad (at

I would suggest that you delete the hyperlinks from these if you
are going to select them. See
http://www.mvps.org/dmcritchie/excel...#DelHyperlinks
actually you can type them in with a single quote prefix to indicate text


Select cells A1 & A4 using Ctrl key
run the macro

The message will not be sent, it will be waiting for you to fill in
your content.

If you are using Outlook Express, the names will be sent as well
based on the email addresses. But the last example (A5:) shows that
you can include both. it should have a single < before the email
and a single after the email address.l

If not familiar with macros see
Getting Started with Macros and User Defined Functions
http://www.mvps.org/dmcritchie/excel/getstarted.htm
---
HTH,
David McRitchie, Microsoft MVP - Excel [site changed Nov. 2001]
My Excel Pages: http://www.mvps.org/dmcritchie/excel/excel.htm
Search Page: http://www.mvps.org/dmcritchie/excel/search.htm


"lldjc" wrote ...
I keep a listing of family e-mail addresses in Excel. I'd like to be able to
pick and choose several hyperlinks to be able to send e-mails to whoever I
choose. Is this possible? I seem to be able to only send e-mail to one
hyperlink at a time.