The below macro triggers a compile error in excel 2010. I am not great with macros, so any insight would be appreciate. The macro copies part of a workbook and pastes it as a picture in the body of an email and sends it.
Code:
Sub FRIMail()
Dim r As Range
Set r = Worksheets("Fri").Range("A1:M69")
r.Copy
Dim OutApp As Object
Dim outMail As Object
Set OutApp = CreateObject("Outlook.Application")
Set outMail = OutApp.CreateItem(0)
On Error Resume Next
With outMail
.display
.HTMLBody = activemailmessage.HTMLBody
.To = Worksheets("Distribution").Range("N13").Value
.CC = ""
.BCC = ""
.Subject = "REPORT"
.body = "Report was run on: " & Now
Dim wordDoc As Word.document
Set wordDoc = outMail.GetInspector.WordEditor
wordDoc.Range.PasteAndFormat wdChartPicture
outMail.send
End With
End Sub