I have a form that I am wanting to send via email. I have the code and it works if I input an email address manually, however, I want to automate the process. I want the macro to pull the recipient email address from the worksheet and apply it to the .To field. '
Here is the code that i am using.....
Any assistance would be good. I tried the following and none of these worked.
None of these worked either.
Here is the code that i am using.....
Code:
With OutlookMail .To =[B]I would like this field to pull data from cell B18.[/B]
.CC = ""
.BCC = ""
.Subject = "Time Additions and Corrections for " & Range("B18")
.Body = "Please see the attached GSS 27."
.Attachments.Add Application.ActiveWorkbook.FullName
.Send
End With
Set OutlookMail = Nothing
Set OutlookApp = Nothing
MsgBox "Your email has been sent to " & Range("B19")
Any assistance would be good. I tried the following and none of these worked.
Code:
.To =[B]Range("B18")[/B]
Code:
.To =Cells(18, 2[B])[/B]
None of these worked either.