Hey.
Hoping someone might be able to help. I'm trying to copy a range of cells and paste it into an email. Really struggling here, and need to do something similar to this with a bunch of emails.
Hoping it looks like:
Hey,
Here's the summary below.
TABLE INSERTS HERE
Thanks.
Myself
Here is my macro so far. Does everything but inserts the table from excel.
Any help would really be appreciated!!!
Thanks!
Sub EmailVIRSummary()
Dim emailtext As Range
Dim emailtext2 As String
Dim OutApp As Object
Dim OutMail As Object
Worksheets("VIR Summary").Activate
Set emailtext = Range("B2:R50")
Set emailtext = Sheets("VIR Summary").Range("B2:R75").SpecialCells(xlCellTypeVisible)
emailtext2 = Range("Hello").Value & "<br><br>" & Range("Intro").Value & "<br><br>" & Range("ToNote").Value & "<br><br>" & "<br><br>" & _
Range("Thanks").Value & "<br><br>" & Range("EmailFrom").Value
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
Worksheets("Email Macro - VIR Summary").Activate
With OutMail
.To = Range("C22").Value & "; " & Range("c23").Value & "; " & Range("c24").Value & "; " & Range("c25").Value _
& "; " & Range("c26").Value & "; " & Range("c27").Value & "; " & Range("c28").Value & "; " & Range("c29").Value _
& "; " & Range("c30").Value & "; " & Range("c31").Value
.CC = Range("J22").Value & "; " & Range("J23").Value & "; " & Range("J24").Value & "; " & Range("J25").Value _
& "; " & Range("J26").Value & "; " & Range("J27").Value & "; " & Range("J28").Value & "; " & Range("J29").Value _
& "; " & Range("J30").Value & "; " & Range("J31").Value
.BCC = ""
.Subject = Range("D20").Value
.HTMLBody = emailtext2
.Display
End With
End Sub
Hoping someone might be able to help. I'm trying to copy a range of cells and paste it into an email. Really struggling here, and need to do something similar to this with a bunch of emails.
Hoping it looks like:
Hey,
Here's the summary below.
TABLE INSERTS HERE
Thanks.
Myself
Here is my macro so far. Does everything but inserts the table from excel.
Any help would really be appreciated!!!
Thanks!
Sub EmailVIRSummary()
Dim emailtext As Range
Dim emailtext2 As String
Dim OutApp As Object
Dim OutMail As Object
Worksheets("VIR Summary").Activate
Set emailtext = Range("B2:R50")
Set emailtext = Sheets("VIR Summary").Range("B2:R75").SpecialCells(xlCellTypeVisible)
emailtext2 = Range("Hello").Value & "<br><br>" & Range("Intro").Value & "<br><br>" & Range("ToNote").Value & "<br><br>" & "<br><br>" & _
Range("Thanks").Value & "<br><br>" & Range("EmailFrom").Value
Set OutApp = CreateObject("Outlook.Application")
Set OutMail = OutApp.CreateItem(0)
Worksheets("Email Macro - VIR Summary").Activate
With OutMail
.To = Range("C22").Value & "; " & Range("c23").Value & "; " & Range("c24").Value & "; " & Range("c25").Value _
& "; " & Range("c26").Value & "; " & Range("c27").Value & "; " & Range("c28").Value & "; " & Range("c29").Value _
& "; " & Range("c30").Value & "; " & Range("c31").Value
.CC = Range("J22").Value & "; " & Range("J23").Value & "; " & Range("J24").Value & "; " & Range("J25").Value _
& "; " & Range("J26").Value & "; " & Range("J27").Value & "; " & Range("J28").Value & "; " & Range("J29").Value _
& "; " & Range("J30").Value & "; " & Range("J31").Value
.BCC = ""
.Subject = Range("D20").Value
.HTMLBody = emailtext2
.Display
End With
End Sub