VBA Email Sending

tlrobinson512

New Member
Joined
Jun 24, 2014
Messages
21
Hello,

I am searching for the solution to being able to send an autoemail based on the email address entered into a specific cell in Excel.

I have been successful in writing a code for calling up a macro that has a specific email address in it and sending the auto email via outlook, but in this case, the user inputs their name and email address into two cells, and I want it to pick up that email address in cell "D24" and send an auto response. Any help would be GREATLY appreciated!! I am a novice VBA user. The email would be sent upon clicking of the command button I have in the sheet.
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
In case anyone ever needs this, I was given the piece of the puzzle in this code. It is below.

Dim myApp As Outlook.Application, myMail As Outlook.MailItem
Set myApp = New Outlook.Application
Set myMail = myApp.CreateItem(olMailItem)
myMail.To = Cells(22, 4)
With myMail
.Subject = "Your Request " & "Ref No. " & Cells(7, 4)
.Body = "Thank you for submitting your request. We have received your request and will begin prcoessing it immediately. Please allow 30 days for resolution." & vbCrLf & vbCrLf
.Send
End With
Set myApp = Nothing
Set myMail = Nothing
 
Upvote 0

Forum statistics

Threads
1,214,826
Messages
6,121,795
Members
449,048
Latest member
greyangel23

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top