Hello,
I have created a document with a list of peoples emails.
I want to create a command button that will select a range and select all the email hyperlinks and set up a single email to send to them.
I can get the macro to select the range but it will only email the first one on the list, not the whole ground.
Code is below:
Private Sub Email_Leaders_Click() Range("D5:D17").Select Selection.Hyperlinks(1).Follow NewWindow:=False, AddHistory:=True End Sub
I want the email to be to all 13 people however the number after hyperlinks(x) corresponds to the person who will be emailed... i.e. 1 is first on the list, 13 is last.
Any ways round this? Simple as possible please!
Many thanks,
Damien
Last edited by Leith Ross; 06-14-2010 at 02:03 PM. Reason: Added Code Tags
Hi Damien,
You can loop through the index from 5 to 17.
Private Sub Email_Leaders_Click() Range("D5:D17").Select Dim index as Integer For index = 5 to 17 Selection.Hyperlinks(index).Follow NewWindow:=False, AddHistory:=True Next End Sub
Salim
Many thanks, that's briliant.
I know similar threads have been created in the past but I can't quite find one that I'm after.
Is there a way to create a single new blank email addressed to all the selected range (rather than individual emails adressed).
I am designing a spreadsheet to act as a mailing list where we are holding events and want to create a command button to say email all (who meet condition) where the conditions are held in a spreadsheet.
Thanks in advance...
Hi,
As per my knowledge you can use "CDO.Message" object for sending email.
Look at the below link. It will help for you.
http://www.excelforum.com/excel-prog...nt-people.html
Salim
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks