flower3954
Board Regular
- Joined
- May 5, 2012
- Messages
- 50
Hi all-
I am trying to fully automate the creation of emails. See VBA code below.
I just need to use VBA to paste the selected range from excel into the body of the Outlook email.
Any suggestions?
Sub WELCOMEEMAIL_Button19_Click()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
' Change the mail address and subject in the macro before you run it.
With OutMail
.To = ""
.CC = Cells(1, 1).Text
.BCC = "STIP.CHASER@HUNTINGTON.COM"
.Subject = ""
.Subject = "A MESSAGE FROM HUNTINGTON - YOU'VE REACHED THE NEXT STEP IN THE LOAN PROCESS - " & Cells(2, 1).Text
.Body = ""
.Display
.Attachments.Add "http://my.hban.us/personal/hb10410/Shared Documents/BORROWER AUTH FORM.pdf"
Range("b3:b50").Select
Selection.Copy
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub
I am trying to fully automate the creation of emails. See VBA code below.
I just need to use VBA to paste the selected range from excel into the body of the Outlook email.
Any suggestions?
Sub WELCOMEEMAIL_Button19_Click()
Dim OutApp As Object
Dim OutMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
' Change the mail address and subject in the macro before you run it.
With OutMail
.To = ""
.CC = Cells(1, 1).Text
.BCC = "STIP.CHASER@HUNTINGTON.COM"
.Subject = ""
.Subject = "A MESSAGE FROM HUNTINGTON - YOU'VE REACHED THE NEXT STEP IN THE LOAN PROCESS - " & Cells(2, 1).Text
.Body = ""
.Display
.Attachments.Add "http://my.hban.us/personal/hb10410/Shared Documents/BORROWER AUTH FORM.pdf"
Range("b3:b50").Select
Selection.Copy
End With
On Error GoTo 0
Set OutMail = Nothing
Set OutApp = Nothing
End Sub