Hello,
I need to create a macro that sends out emails through Outlook. Plese see my exmaple code below. Instead of sending an attachment, is it possible to copy the content of the excel spreadsheet and paste it directly to the email body.
many thanks in advance.
Peter
-------------------------------
Sub Email()
Dim myOutlook As Object
Dim myMailItem As Object
Dim FileAttach As String
Application.DisplayAlerts = False
Set olApp = CreateObject("Outlook.Application")
Set olMail = olApp.CreateItem(olMailItem)
FileAttach = ActiveWorkbook.Path & "\" & ActiveWorkbook.Name
With olMail
.To = "
[email protected]"
.Subject = "Test"
.Body = "test emails"
.Attachments.Add FileAttach
.Send
End With
End Sub
-------------------------