Hi guys,
I found the following code on the forum:
The task is to send emails according to generated list of customers. Emails will be sent one email per customer. The email body will start with a personal name (Dear [customer name]). This part will be solved with a loop as well as an appropriate recipient's email address. I don't need assistance on that issue.
After the "Dear [customer name]", I need to insert the file from a template. For the template, I was planning to use a .eml file from Thunderbird, or a Word file, as there will be some images along with the text. Is there a way to insert the existing Word or .eml template after "Dear [customer name]" to the message body?
Please be gentle, I am not a professional
I found the following code on the forum:
Code:
Public Sub SendEmail()
Dim thund As String
Dim SendFrom As String
Dim Email As String
Dim cc As String
Dim bcc As String
Dim subj As String
Dim body As String
SendFrom = "test@test.com"
Email = "test@test.com"
cc = ""
bcc = ""
subj = "Testing"
body = "Testing"
thund = "C:\Program Files (x86)\Mozilla Thunderbird\thunderbird.exe " & _
"-compose " & """" & _
"from='" & SendFrom & "'," & _
"to='" & Email & "'," & _
"cc='" & cc & "'," & _
"bcc='" & bcc & "'," & _
"subject='" & subj & "'," & _
"body='" & body & "'" & """"
Call Shell(thund, vbNormalFocus)
For counter1 = 1 To 10000
Next
Application.Wait (Now + TimeValue("0:00:03"))
SendKeys "^{ENTER}", True
End Sub
The task is to send emails according to generated list of customers. Emails will be sent one email per customer. The email body will start with a personal name (Dear [customer name]). This part will be solved with a loop as well as an appropriate recipient's email address. I don't need assistance on that issue.
After the "Dear [customer name]", I need to insert the file from a template. For the template, I was planning to use a .eml file from Thunderbird, or a Word file, as there will be some images along with the text. Is there a way to insert the existing Word or .eml template after "Dear [customer name]" to the message body?
Please be gentle, I am not a professional
