I have a form that displays data about objects. Each object has an email address associated with it. I have a button that can send an email to the address shown on the current record. The following code does this:
varEmail = Me!Premail
DoCmd.SendObject acSendNoObject, , , varEmail
I also have a need to send a bulk email to every email address from every record. I can create a query to extract the email addresses from the table. At this point I could export to a Word Mail merge document etc. However, I would prefer the user to click a button to open a blank email with all email addresses loaded in the TO or BCC fields from the query. The user would then type the subject and message and then Send.
It would seem that I need to read the query results into an array or direct into a variable (varEmail)
I would prefer to use the SendObject command since it is MAPI compliant and some users are using Thunderbird or Eudora instead of Outlook.
nq
varEmail = Me!Premail
DoCmd.SendObject acSendNoObject, , , varEmail
I also have a need to send a bulk email to every email address from every record. I can create a query to extract the email addresses from the table. At this point I could export to a Word Mail merge document etc. However, I would prefer the user to click a button to open a blank email with all email addresses loaded in the TO or BCC fields from the query. The user would then type the subject and message and then Send.
It would seem that I need to read the query results into an array or direct into a variable (varEmail)
I would prefer to use the SendObject command since it is MAPI compliant and some users are using Thunderbird or Eudora instead of Outlook.
nq