Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default how to generate email list for Outlook from Excel cells

I have a contact list created in Excel, on each row I have different contact
information such as name, business unit, phone and email address.

What I want to do:
When filtering on a certain business unit from this table I would like to
generate in Outlook the email list of this business unit to send an email to
all the persons of these business unit.

Please let me know how I can make that happen.

Thanks,

Emmanuel
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default how to generate email list for Outlook from Excel cells

Hi Emanu88

Try this sample for Outlook
This will use all the visible cells in A1:A10 in "Sheet1"
Change it to your sheet and range

Sub Mail_small_Text_Outlook()
'Working in Office 2000-2007
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")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
For Each cell In
ThisWorkbook.Sheets("Sheet1").Range("A1:A10").Spec ialCells(xlCellTypeVisible)
If cell.Value Like "?*@?*.?*" Then
strto = strto & cell.Value & ";"
End If
Next cell
On Error GoTo 0
If Len(strto) 0 Then strto = Left(strto, Len(strto) - 1)

strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"

On Error Resume Next
With OutMail
.To = strto
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = strbody
'You can add a file like this
'.Attachments.Add ("C:\test.txt")
.Display 'or use .Send
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub



--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Emanu88" wrote in message
...
I have a contact list created in Excel, on each row I have different
contact
information such as name, business unit, phone and email address.

What I want to do:
When filtering on a certain business unit from this table I would like to
generate in Outlook the email list of this business unit to send an email
to
all the persons of these business unit.

Please let me know how I can make that happen.

Thanks,

Emmanuel


  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default how to generate email list for Outlook from Excel cells

On Oct 21, 7:27*am, "Ron de Bruin" wrote:
Hi Emanu88

Try this sample forOutlook
This will use all the visible cells in A1:A10 in "Sheet1"
Change it to your sheet and range

Sub Mail_small_Text_Outlook()
'Working in Office 2000-2007
* * 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")
* * OutApp.Session.Logon
* * Set OutMail = OutApp.CreateItem(0)

* * On Error Resume Next
* * For Each cell In
ThisWorkbook.Sheets("Sheet1").Range("A1:A10").Spec ialCells(xlCellTypeVisibl*e)
* * * * If cell.Value Like "?*@?*.?*" Then
* * * * * * strto = strto & cell.Value & ";"
* * * * End If
* * Next cell
* * On Error GoTo 0
* * If Len(strto) 0 Then strto = Left(strto, Len(strto) - 1)

* * strbody = "Hi there" & vbNewLine & vbNewLine & _
* * * * * * * "This is line 1" & vbNewLine & _
* * * * * * * "This is line 2" & vbNewLine & _
* * * * * * * "This is line 3" & vbNewLine & _
* * * * * * * "This is line 4"

* * On Error Resume Next
* * With OutMail
* * * * .To = strto
* * * * .CC = ""
* * * * .BCC = ""
* * * * .Subject = "This is the Subject line"
* * * * .Body = strbody
* * * * 'You can add a file like this
* * * * '.Attachments.Add ("C:\test.txt")
* * * * .Display * 'or use .Send
* * End With
* * On Error GoTo 0

* * Set OutMail = Nothing
* * Set OutApp = Nothing
End Sub

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

"Emanu88" wrote in message

...



I have a contactlistcreated inExcel, on each row I have different
contact
information such as name, business unit, phone and email address.


What I want to do:
When filtering on a certain business unit from this table I would like to
generate inOutlookthe emaillistof this business unit tosendan email
to
all the persons of these business unit.


Please let me know how I can make that happen.


Thanks,


Emmanuel- Hide quoted text -


- Show quoted text -


Hello my name is Drew and i have a similiar question.

I have a list of contacts that I would like to send a general email
to. The subject will be the same as will most of the text. I would
like to write a Macro that would fill the "To" field from one column,
then fill the constant subject line, then fill in the contacts name
and company name into the text of the email. Then I would like the
macro to repeat this process down the column.

Thanks in advance,
Drew
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,123
Default how to generate email list for Outlook from Excel cells

Hi Drew

Try this one
http://www.rondebruin.nl/mail/folder3/message.htm

--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


"Drew" wrote in message ...
On Oct 21, 7:27 am, "Ron de Bruin" wrote:
Hi Emanu88

Try this sample forOutlook
This will use all the visible cells in A1:A10 in "Sheet1"
Change it to your sheet and range

Sub Mail_small_Text_Outlook()
'Working in Office 2000-2007
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")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)

On Error Resume Next
For Each cell In
ThisWorkbook.Sheets("Sheet1").Range("A1:A10").Spec ialCells(xlCellTypeVisibl*e)
If cell.Value Like "?*@?*.?*" Then
strto = strto & cell.Value & ";"
End If
Next cell
On Error GoTo 0
If Len(strto) 0 Then strto = Left(strto, Len(strto) - 1)

strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"

On Error Resume Next
With OutMail
.To = strto
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = strbody
'You can add a file like this
'.Attachments.Add ("C:\test.txt")
.Display 'or use .Send
End With
On Error GoTo 0

Set OutMail = Nothing
Set OutApp = Nothing
End Sub

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

"Emanu88" wrote in message

...



I have a contactlistcreated inExcel, on each row I have different
contact
information such as name, business unit, phone and email address.


What I want to do:
When filtering on a certain business unit from this table I would like to
generate inOutlookthe emaillistof this business unit tosendan email
to
all the persons of these business unit.


Please let me know how I can make that happen.


Thanks,


Emmanuel- Hide quoted text -


- Show quoted text -


Hello my name is Drew and i have a similiar question.

I have a list of contacts that I would like to send a general email
to. The subject will be the same as will most of the text. I would
like to write a Macro that would fill the "To" field from one column,
then fill the constant subject line, then fill in the contacts name
and company name into the text of the email. Then I would like the
macro to repeat this process down the column.

Thanks in advance,
Drew

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default how to generate email list for Outlook from Excel cells

On Oct 27, 12:35*pm, "Ron de Bruin" wrote:
Hi Drew

Try this onehttp://www.rondebruin.nl/mail/folder3/message.htm

--

Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm

"Drew" wrote in ...

On Oct 21, 7:27 am, "Ron de Bruin" wrote:





Hi Emanu88


Try this sample forOutlook
This will use all the visible cells in A1:A10 in "Sheet1"
Change it to your sheet and range


Sub Mail_small_Text_Outlook()
'Working in Office 2000-2007
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")
OutApp.Session.Logon
Set OutMail = OutApp.CreateItem(0)


On Error Resume Next
For Each cell In
ThisWorkbook.Sheets("Sheet1").Range("A1:A10").Spec ialCells(xlCellTypeVisibl**e)
If cell.Value Like "?*@?*.?*" Then
strto = strto & cell.Value & ";"
End If
Next cell
On Error GoTo 0
If Len(strto) 0 Then strto = Left(strto, Len(strto) - 1)


strbody = "Hi there" & vbNewLine & vbNewLine & _
"This is line 1" & vbNewLine & _
"This is line 2" & vbNewLine & _
"This is line 3" & vbNewLine & _
"This is line 4"


On Error Resume Next
With OutMail
.To = strto
.CC = ""
.BCC = ""
.Subject = "This is the Subject line"
.Body = strbody
'You can add a file like this
'.Attachments.Add ("C:\test.txt")
.Display 'or use .Send
End With
On Error GoTo 0


Set OutMail = Nothing
Set OutApp = Nothing
End Sub


--


Regards Ron de Bruinhttp://www.rondebruin.nl/tips.htm


"Emanu88" wrote in message


...


I have a contactlistcreated inExcel, on each row I have different
contact
information such as name, business unit, phone and email address.


What I want to do:
When filtering on a certain business unit from this table I would like to
generate inOutlookthe emaillistof this business unit tosendan email
to
all the persons of these business unit.


Please let me know how I can make that happen.


Thanks,


Emmanuel- Hide quoted text -


- Show quoted text -


Hello my name is Drew and i have a similiar question.

I have alistof contacts that I would like tosenda general email
to. The subject will be the same as will most of the text. I would
like to write a Macro that would fill the "To" field from one column,
then fill the constant subject line, then fill in the contacts name
and company name into the text of the email. Then I would like the
macro to repeat this process down the column.

Thanks in advance,
Drew- Hide quoted text -

- Show quoted text -


Thank you so much for the help.
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
Can I merge a list of email addresses from exel into outlook? MDuda New Users to Excel 1 September 10th 09 07:37 PM
How do I generate an email list from my worksheet? Kris Excel Discussion (Misc queries) 10 September 9th 08 09:59 AM
Auto-generate OUTLOOK email based upon EXCEL Workbook data Henn9660 Excel Discussion (Misc queries) 3 April 11th 08 08:05 PM
import email addresses into a outlook distribution list summer Excel Discussion (Misc queries) 3 December 11th 07 08:45 PM
transfer email address cells from excel to outlook paul2006 Excel Discussion (Misc queries) 1 January 23rd 06 04:12 PM


All times are GMT +1. The time now is 05:19 AM.

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"