Hello everyone
I have a code that send one message to multiple recipients
Sub Send_Multiple_Emails()
Dim lastRow As Long
Dim I As Long
Dim strFolder As String
Dim mailObject As Variant
Dim outApp As Variant
strFolder = ThisWorkbook.Path & "\Files\"
lastRow = Cells(Rows.Count, "A").End(xlUp).Row
For I = 3 To lastRow
Set mailObject = CreateObject("Outlook.Application")
Set outApp = mailObject.CreateItem(0)
With outApp
.Subject = Range("B2").Value
.Body = Range("C2").Value
.To = Cells(I, 1).Value
.Attachments.Add strFolder & Cells(2, 4).Value
.Send
End With
Next I
Set mailObject = Nothing
Set outApp = Nothing
MsgBox "Done...", 64
Debugs:
If Err.Description <> "" Then MsgBox Err.Description
End Sub
But I need to send multiple emails as attached and if possible make attachments optional by using check boxes for example
Thanks advanced for help
Bookmarks