email from excel

samndi67

New Member
Joined
Feb 15, 2011
Messages
14
Good evening,

I've gotten some great help with all my questions about sending e-mail from excel. I have one additional question, I would like the body of my email to be taken from a word document. (the big reason for this is that the email must be formatted to include a picture). Is this possible? I'd need to insert the information from the word document then some additional data from my excel workhseet.

here is the code I am using to send the email:
Rich (BB code):
Sub SendEmail2_Click()
'Create variables
Dim OutApp As Object
Dim OutMail As Object
Dim AW As Worksheet
Dim i As Integer
Dim Greeting As String
Dim Greeting1 As String
Dim Subject As String
Set AW = ActiveSheet
On Error GoTo cleanup
Set OutApp = CreateObject("Outlook.Application")
OutApp.Session.Logon
With Application
.EnableEvents = False
.ScreenUpdating = False
End With
Do
Set OutMail = OutApp.CreateItem(0)
On Error Resume Next
'Create email
Subject = "Perfect 10"
Greeting1 = "Dear" & "" & AW.Range("B" & i).Value
 
With OutMail
.To = AW.Range("C" & i).Value
.Subject = Subject
.Body = I'd like the stuff from word here then this
"<a href=""" & AW.Range("F" & i).Value & """>Click here</a>" & _
             vbNewLine
 
'Send the e-mail
.Send
End With
i = i + 1
Loop Until IsEmpty(Cells(i, 1))
On Error GoTo 0
Set OutMail = Nothing
AW.AutoFilterMode = False
cleanup:
Set OutApp = Nothing
With Application
.EnableEvents = True
.ScreenUpdating = True
End With
End Sub

Thanks in advance for all your help,
Sam
 

Excel Facts

Waterfall charts in Excel?
Office 365 customers have access to Waterfall charts since late 2016. They were added to Excel 2019.
I found how to send the body of the e-mail from a Word document (here on the forum) but I'm still having an issue with the pictures getting in the e-mail.

Does anyone know if that is possible from excel?

Thanks,
Sam
 
Upvote 0

Forum statistics

Threads
1,224,587
Messages
6,179,738
Members
452,940
Latest member
Lawrenceiow

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