eric86vabeach
New Member
- Joined
- Jan 29, 2014
- Messages
- 23
i keep getting an error can some1 look at this and help me fix this code?
or help me with the notes in this code
Sub sendemail(what_address As String, subject_line As String, mail_body As String)
Dim olapp As Outlook.Application
Set olapp = CreateObject("outlook.application")
Dim olMail As Outlook.MailItem
setolmail = olapp.CreateItem(olMailItem)
olMail.To = what_address
olMail.Sub = subject_line
olMail.Body = mail_body
olMail.Send
End Sub
Sub sendmassemail()
row_number = 2
Do
DoEvents
row_numbers = row_number + 1
Call sendemail(Sheet4.Range("BD" & row_number), "this is a test email", Sheet5.Range("BV2")) 'please read note at bottom about this line
Loop Until row_number = 6
End Sub
i would like cell "BQ1" type in the a cell # and it would say to the code grab the email from that cell and i think it would go where "this is a test email" goes?
thanks for your time and reading this
Eric
or help me with the notes in this code
Sub sendemail(what_address As String, subject_line As String, mail_body As String)
Dim olapp As Outlook.Application
Set olapp = CreateObject("outlook.application")
Dim olMail As Outlook.MailItem
setolmail = olapp.CreateItem(olMailItem)
olMail.To = what_address
olMail.Sub = subject_line
olMail.Body = mail_body
olMail.Send
End Sub
Sub sendmassemail()
row_number = 2
Do
DoEvents
row_numbers = row_number + 1
Call sendemail(Sheet4.Range("BD" & row_number), "this is a test email", Sheet5.Range("BV2")) 'please read note at bottom about this line
Loop Until row_number = 6
End Sub
i would like cell "BQ1" type in the a cell # and it would say to the code grab the email from that cell and i think it would go where "this is a test email" goes?
thanks for your time and reading this
Eric