I maintain a mailing list for a community organization. Originally, one e-mail would be sent to all members on our mailing list using Apple Safari. As the list grew, I learned the local ISPs were rejecting mailings sent from me as the large number of addresses were view as spam.
Since I haven't learned Applescript, I decided to modify a e-mail routine I wrote years ago in VBA. This script launches Outlook out of Excel (MS Office 2010/Windows 7) and creates an individual e-mail to each address on the list instead of one e-mail to everyone. Everything is working fine except the signature will not attach.
Any suggestions?
Here's the code (the "Instructions" sheet contains the list of e-mail addresses [following named range "EmailList"], subject line, and body of email)
Public Sub EmailOrg()
Dim OutApp As Object
Dim OutMail As Object
Dim i As Integer
Dim shtSource As Worksheet
Dim iRows As Integer
Set shtSource = Sheets("Instructions")
iRows = Range("EmailHead").CurrentRegion.Rows.Count
For i = 1 To iRows - 1
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
With OutMail
.To = Range("EmailList").Offset(i, 0).Value 'list of addresses
.Subject = shtSource.Cells(2, 5)
.body = shtSource.Cells(6, 5)
'.Display 'or use .Send
.send
End With
Set OutMail = Nothing
Set OutApp = Nothing
Next i
End Sub
So, I hope someone can help. I also would like to retain the formatting of the signature - is there a way to control formatting within the outlook message from VBA?
Art