Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default Can I use excel to send personalized emails?

I have a membership database containing about 1600 individuals, and I need to
email them each their membership number. Is it possible to send out all of
the emails at once? For example, I want to send an email to each of the
addresses in column C, addressed "Dear (firstname)", and containing their
membership number from column Q. Can I do that without sending 1600
individual emails?

Thanks...
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Can I use excel to send personalized emails?

Yes. For example, name a cell MessageBody, and enter your message, like this:

Hello FirstName,

The LastName Family's membership number is MemberNumber.

Thanks,
Will

Name the cells with the addresses in column C EMailAddresses, and in the first row of your
database, have the headers
FirstName, LastName, and MemberNumber (and any other values that you want to include) somewhere
between column D and column Z.

The macro will check columns D through Z for values, and replace any instance of the header string
within the message with the corresponding value from that column.

So, the message might become, for example,

Hello Bernie,

The Deitrick Family's membership number is 12345A.

Thanks,
Will

The macro requires a reference to MS outlook. Depending on your version, you may need to click once
for every email message. Test it on a small set first, of course....

HTH,
Bernie
MS Excel MVP

Sub EmailRecipient()
Dim ol As Object
Dim myItem As Object
Dim AddCell As Range
Dim myCell As Range
Dim myAttachments As Attachments

Set ol = CreateObject("outlook.application")
For Each AddCell In Range("EMailAddresses")
Set myItem = ol.CreateItem(olMailItem)
myItem.To = AddCell.Value

myItem.Subject = "Membership number...."

myItem.Body = Range("MessageBody").Value
For Each myCell In Range(AddCell(1, 2), AddCell(1, 23))
If myCell.Value < "" Then
myItem.Body = Replace(myItem.Body, Cells(1, myCell.Column), myCell.Value)
Else
GoTo SendMsg:
End If
Next myCell

SendMsg:
'remove this line
Set myAttachments = myItem.Attachments
myAttachments.Add ThisWorkbook.FullName, olByValue
myItem.Send
Next AddCell

Set ol = Nothing
End Sub


"ewill14" wrote in message
...
I have a membership database containing about 1600 individuals, and I need to
email them each their membership number. Is it possible to send out all of
the emails at once? For example, I want to send an email to each of the
addresses in column C, addressed "Dear (firstname)", and containing their
membership number from column Q. Can I do that without sending 1600
individual emails?

Thanks...



  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,441
Default Can I use excel to send personalized emails?

I'm sorry, I should have removed these lines:

Set myAttachments = myItem.Attachments
myAttachments.Add ThisWorkbook.FullName, olByValue

HTH,
Bernie
MS Excel MVP


"Bernie Deitrick" <deitbe @ consumer dot org wrote in message
...
Yes. For example, name a cell MessageBody, and enter your message, like this:

Hello FirstName,

The LastName Family's membership number is MemberNumber.

Thanks,
Will

Name the cells with the addresses in column C EMailAddresses, and in the first row of your
database, have the headers
FirstName, LastName, and MemberNumber (and any other values that you want to include) somewhere
between column D and column Z.

The macro will check columns D through Z for values, and replace any instance of the header string
within the message with the corresponding value from that column.

So, the message might become, for example,

Hello Bernie,

The Deitrick Family's membership number is 12345A.

Thanks,
Will

The macro requires a reference to MS outlook. Depending on your version, you may need to click
once for every email message. Test it on a small set first, of course....

HTH,
Bernie
MS Excel MVP

Sub EmailRecipient()
Dim ol As Object
Dim myItem As Object
Dim AddCell As Range
Dim myCell As Range
Dim myAttachments As Attachments

Set ol = CreateObject("outlook.application")
For Each AddCell In Range("EMailAddresses")
Set myItem = ol.CreateItem(olMailItem)
myItem.To = AddCell.Value

myItem.Subject = "Membership number...."

myItem.Body = Range("MessageBody").Value
For Each myCell In Range(AddCell(1, 2), AddCell(1, 23))
If myCell.Value < "" Then
myItem.Body = Replace(myItem.Body, Cells(1, myCell.Column), myCell.Value)
Else
GoTo SendMsg:
End If
Next myCell

SendMsg:
'remove this line
Set myAttachments = myItem.Attachments
myAttachments.Add ThisWorkbook.FullName, olByValue
myItem.Send
Next AddCell

Set ol = Nothing
End Sub


"ewill14" wrote in message
...
I have a membership database containing about 1600 individuals, and I need to
email them each their membership number. Is it possible to send out all of
the emails at once? For example, I want to send an email to each of the
addresses in column C, addressed "Dear (firstname)", and containing their
membership number from column Q. Can I do that without sending 1600
individual emails?

Thanks...





  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 11,123
Default Can I use excel to send personalized emails?

See also my site
http://www.rondebruin.nl/sendmail.htm

Look also at the CDO page (no warnings then)

--

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


"ewill14" wrote in message ...
I have a membership database containing about 1600 individuals, and I need to
email them each their membership number. Is it possible to send out all of
the emails at once? For example, I want to send an email to each of the
addresses in column C, addressed "Dear (firstname)", and containing their
membership number from column Q. Can I do that without sending 1600
individual emails?

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
Error #1004 routine send emails Gus[_2_] Excel Discussion (Misc queries) 0 June 7th 07 01:23 AM
Can Excel send out emails? Robert Hodge Excel Discussion (Misc queries) 1 January 10th 06 10:11 AM
Can excel send reminder emails on dates entered in a wookbook? Doubting_her_boss Excel Discussion (Misc queries) 2 October 27th 05 09:33 PM
send emails hanasamo Excel Discussion (Misc queries) 1 August 2nd 05 06:34 AM
Can you tell Excel to send emails through Outlook? Donald S Excel Discussion (Misc queries) 1 June 30th 05 05:21 PM


All times are GMT +1. The time now is 10:08 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"