I have a button on a form that I would like when pressed to email a group of people. I have a query that lists email addresses of the individuals that should receive the email but only the first email address is entered into the "TO" field instead of the entire list. Was wondering if someone could help out. The code for my button that i am using is below:
Thanks for any help or suggestions.
Paul
Code:
Dim olapp As Outlook.Application
Dim olNewMail As Outlook.MailItem
Dim eTo, eSubject, ebody As String
eTo = DLookup("emailadress", "qryemail")
eSubject = "KNOWLEDGEBASE - Missing Document(s)"
ebody = "test"
Set olapp = New Outlook.Application
Set olNewMail = olapp.CreateItem(olMailItem)
olNewMail.To = eTo
olNewMail.Subject = eSubject
olNewMail.Body = [Main_category] & Chr$(13) & [Second_category] & Chr$(13) & [Third_category] & Chr$(13)
olNewMail.Display
Thanks for any help or suggestions.
Paul