Hi,

I am new to this forum. I have found a VBA code from the internet. Please can anyone help to modify it so it also attaches a file from "C:\Documents\CustomerQuestions.docx" with each outgoing email.


Sub SendEmails(what_address As String, subject_line As String, mail_body As String)
'
' SendEmails Macro
'

'
Dim olApp As Outlook.Application
Set olApp = CreateObject("Outlook.Application")

Dim olMail As Outlook.MailItem
Set olMail = olApp.CreateItem(olMailItem)


olMail.To = what_address
olMail.Subject = subject_line
olMail.Body = mail_body
olMail.Send


End Sub

Sub SendMassEmails()

row_number = 1

Do
DoEvents
row_number = row_number + 1
Call SendEmails(Sheet1.Range("A" & row_number), "Customer Questionnaire", Sheet1.Range("J2"))

Loop Until row_number = 30 'there are only 29 customers in total


End Sub