Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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
Posted to microsoft.public.excel.misc
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Multiple Excel versions. | Excel Discussion (Misc queries) | |||
Multiple workbooks on Taskbar in Excel 97 | Excel Discussion (Misc queries) | |||
how to copy multiple Excel files from Outlook into Excel??? | Excel Discussion (Misc queries) | |||
Problem opening excel files from email | Excel Discussion (Misc queries) | |||
send email from Excel 2000 | Excel Discussion (Misc queries) |