Send multiple email in Excel

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a column named e-mails in excel that e-mail addresses accommodate in
that column. What I want to do is to send an email to selected email
addresses via outlook. I want outlook to be opened and all the selected email
addresses are placed in the to: field in outlook. Is there any way to do that?
 
Hi Appache

You can do it with a macro if you want

Sub Mail_small_Text_Outlook()
Dim OutApp As Object
Dim OutMail As Object
Dim strbody As String
Dim cell As Range
Dim strto As String

Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"

For Each cell In Selection
If cell.Value Like "*@*" Then
strto = strto & cell.Value & ";"
End If
Next
If Len(strto) > 0 Then strto = Left(strto, Len(strto) - 1)

With OutMail
.To = strto
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = strbody
.display
End With

Set OutMail = Nothing
Set OutApp = Nothing
End Sub
 
I assign the macro to a button but it gives an error which is "Cant execute
code in break mode" on the line of Set OutApp =
CreateObject("Outlook.Application")

I dont know what the break mode is? Do you have any idea what is that?
 

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

Back
Top