I want to be able to add multiple email addresses and have the macro send a separate email for them all. Don't ask why not a single with multiple recipients, I do not know, I am helping someone else out.
How much more difficult would it to instead reference another workbook, "Addresses" and so if the email addresses need to be adjusted that workbook can be opened instead of the macro?
Sub EmailCPR() ' Select the range of cells on the active worksheet. ActiveSheet.Range("X1", ActiveSheet.Range("A1").End(xlDown)).Select ' Show the envelope on the ActiveWorkbook. ActiveWorkbook.EnvelopeVisible = True ' Set the optional introduction field thats adds ' some header text to the email body. It also sets ' the To and Subject lines. Finally the message ' is sent. With ActiveSheet.MailEnvelope .Introduction = "Production Report." .Item.To = "[email protected]" .Item.Subject = Format(Now, "mm-dd-yy ") & "Production Report" End With End Sub
Bookmarks