Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Send multiple email in Excel

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?

--
Thanks
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Send multiple email in Excel

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


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
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?

--
Thanks



  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Send multiple email in Excel

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?

--
Thanks


"Ron de Bruin" wrote:

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


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
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?

--
Thanks




  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Send multiple email in Excel

Do you use Outlook or Outlook Express?

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
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?

--
Thanks


"Ron de Bruin" wrote:

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


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
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?

--
Thanks






  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Send multiple email in Excel

Yes I do
--
Thanks


"Ron de Bruin" wrote:

Do you use Outlook or Outlook Express?

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
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?

--
Thanks


"Ron de Bruin" wrote:

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


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
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?

--
Thanks








  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default Send multiple email in Excel

Do you have missing references in ToolsReferences in the VBA editor

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
Yes I do
--
Thanks


"Ron de Bruin" wrote:

Do you use Outlook or Outlook Express?

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
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?

--
Thanks


"Ron de Bruin" wrote:

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


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
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?

--
Thanks








  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11
Default Send multiple email in Excel

I fixed it thank you..
--
Thanks


"Ron de Bruin" wrote:

Do you have missing references in ToolsReferences in the VBA editor

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
Yes I do
--
Thanks


"Ron de Bruin" wrote:

Do you use Outlook or Outlook Express?

--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
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?

--
Thanks


"Ron de Bruin" wrote:

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


--
Regards Ron de Bruin
http://www.rondebruin.nl



"Appache" wrote in message ...
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?

--
Thanks









Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Multiple Excel versions. Naveen Mukkelli Excel Discussion (Misc queries) 0 May 16th 06 12:55 AM
Multiple workbooks on Taskbar in Excel 97 S Dees Excel Discussion (Misc queries) 5 April 19th 06 08:04 PM
how to copy multiple Excel files from Outlook into Excel??? Brainless_in_Boston Excel Discussion (Misc queries) 0 February 24th 06 03:46 PM
Problem opening excel files from email DXC001 Excel Discussion (Misc queries) 1 October 3rd 05 07:56 PM
send email from Excel 2000 D Rogers Excel Discussion (Misc queries) 0 July 14th 05 07:10 PM


All times are GMT +1. The time now is 11:24 PM.

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

About Us

"It's about Microsoft Excel"