You need to go through each cell of the "D3:D6" range and build a To line. Simply assigning this option will not solve the goal. EmailTo becomes an array if you assign a range to it. You can also do this, but then you have to iterate over the array to create a To string
Is that what you are trying? ( TEST AND TEST )
Option Explicit Sub Mail_workbook_Outlook_1() 'Working in 2000-2010 'This example send the last saved version of the Activeworkbook Dim OutApp As Object Dim OutMail As Object Dim emailRng As Range, cl As Range Dim sTo As String Set emailRng = Worksheets("Selections").Range("D3:D6") For Each cl In emailRng sTo = sTo & ";" & cl.Value Next sTo = Mid(sTo, 2) Set OutApp = CreateObject("Outlook.Application") Set OutMail = OutApp.CreateItem(0) On Error Resume Next With OutMail .To = sTo .CC = " person1@email.com ; person2@email.com " .BCC = "" .Subject = "RMA #" & Worksheets("RMA").Range("E1") .Body = "Attached to this email is RMA #" & _ Worksheets("RMA").Range("E1") & _ ". Please follow the instructions for your department included in this form." .Attachments.Add ActiveWorkbook.FullName 'You can add other files also like this '.Attachments.Add ("C:\test.txt") .Display End With On Error GoTo 0 Set OutMail = Nothing Set OutApp = Nothing End Sub
Siddharth route
source share