there are plenty of examples....
try this one, in column A (email addresses), column B(body), column C (yes or no), cell D1(subject)
Sub Button1_Click()
Dim OutApp As Object
Dim OutMail As Object
Dim cell As Range
Application.ScreenUpdating = False
Set OutApp = CreateObject("Outlook.Application")
On Error GoTo cleanup
For Each cell In Columns("a").Cells.SpecialCells(xlCellTypeConstants)
If cell.Value Like "?*@?*.?*" And _
UCase(Cells(cell.Row, "c").Value) = "YES" Then
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
With OutMail
.To = cell.Value
.Subject = [d1]
.Body = Cells(cell.Row, "b").Value
'to add attachment use .Attachments.Add ("C:\test.txt")
.display 'change to "send" when not in TEST mode
End With
On Error GoTo 0
Set OutMail = Nothing
End If
Next cell
cleanup:
Set OutApp = Nothing
Application.ScreenUpdating = True
End Sub
Bookmarks