Hi!
Trying to make a vba that sends an array into the body of an email as an image.
The code i have provided here works great, but the ".body" text always comes below the picture somehow.
Is there a way to make it come on top?
Trying to make a vba that sends an array into the body of an email as an image.
The code i have provided here works great, but the ".body" text always comes below the picture somehow.
Is there a way to make it come on top?
VBA Code:
Sub emailcharts()
Dim ol As Outlook.Application
Dim MyEml As Outlook.MailItem
Dim doc As Word.Document
Dim rng As Range
Set rng = Sheets("Epost").Range("f4:o59")
Set ol = New Outlook.Application
Set MyEml = ol.CreateItem(olMailItem)
rng.Copy
MyEml.Body = vbCr & ThisWorkbook.Sheets("Epost").Range("H2").Value & " " & ThisWorkbook.Sheets("Epost").Range("I2").Value & vbCr & vbCr & _
"Dette er tallene så langt" & vbCr & vbCr
MyEml.Display
Set doc = MyEml.GetInspector.WordEditor
MyEml.To = ThisWorkbook.Sheets("Epost").Range("c6").Value
MyEml.Subject = ThisWorkbook.Sheets("Epost").Range("H2").Value & " " & ThisWorkbook.Sheets("Epost").Range("I2").Value
doc.Range(0, 0).PasteAndFormat Type:=wdChartPicture
End Sub