Hi,

I have the following code to write e-mails.

The receiver is "[email protected]" according to the program.

I would like to change the program so I could pick up new addresses from a list in an excel sheet.

.to = "[email protected]" would thus be changed to the first address in the list and so on.

Could some one help me?

Kind regards,

Jan

Sub Mail_workbook_Outlook_3()
'Working in Excel 2000-2013
'This example send the last saved version of the Activeworkbook
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm
    Dim OutApp As Object
    Dim OutMail As Object

    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)
    
    strbody = "Hej! <br><br>" & _
              "TEXT"

    On Error Resume Next
    With OutMail
        .to = "[email protected]"
        .CC = ""
       .Subject = "Papper"
        .HTMLBody = strbody
        .Attachments.Add ("c:\bilaga\skyddsomslaget.pdf")
        '.Send
        .Display
    End With
    On Error GoTo 0

    Set OutMail = Nothing
    Set OutApp = Nothing
End Sub