Good afternoon,
I have a spreadsheet where the data can automatically be sent out of outlook to the receipts mailbox but the problem i have is that there could be 4- 5 people that may want this data but i have to predefined the mailbox i want it to go to in the code, is there away of inserting something into the below code ( .Item.To =) that will reference a cell to get the email address, that way i can set up a filter drop down box with all the users email address in there.
Sub Email_Todays()
' Select the range of cells on the active worksheet.
ActiveSheet.Range("A1:E200").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 = "Data From DJ Database"
.Item.To = "carolinedixon@1stcreditltd.com"
.Item.CC = "davidjames@1stcreditltd.com"
.Item.Subject = "Management Information"
.Item.Send
End With
End Sub
Bookmarks