Copying a Range from Excel to Outlook with Macro

soco22

New Member
Joined
Nov 4, 2011
Messages
1
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
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying

Forum statistics

Threads
1,207,284
Messages
6,077,527
Members
446,287
Latest member
tjverdugo85

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