I tried a macro for this based off one I use to email an individual person which goes like this:
SendObject ,,,=[Volunteer Name] & IIf(Nz[E-mail Address])<>","[&[E-mail Address] & "]"),,,,,Yes,
I took this macro and added
OpenQuery MyEmailAddresses, Datasheet, Edit
to the top of it...But this only adds one email address when it launches Outlook and I want them all (i.e. email@example.com; firstname.lastname@example.org; email@example.com etc.)
Then, I tried a module with the code below, created a macro called Distribution List and set it to the button in my form that i want to click on to email everyone. But, I get the error 'the object doesn't contain the Automation object 'DistributionList' when I click the button. I'm not sure what this means or how to fix it.
Option Compare Database Private Sub Command309_Click() On Error GoTo Err_Command309_Click Dim strTo As String Dim strCCName As String Dim strTitle As String Dim strMessage As String Dim rs As Recordset Set rs = CurrentDb.OpenRecordset("MyEmailAddresses") Do While Not rs.EOF strTo = rs!Email & "; " rs.MoveNext Loop rs.Close strCCName = "firstname.lastname@example.org" strTitle = "Friends" strMessage = "Hello Friends!" DoCmd.SendObject , , , strTo, strCCName, , strTitle, strMessage, False Exit_Command309_Click: Exit Sub Err_Command309_Click: MsgBox Err.Description Resume Exit_Command309_Click End Sub