Opening MS Outlook new e-mail from MS Access

Hey experts,

I have a MS Access 2007 query that returns 3,613 records with valid e-mails in the [E-mail] field. I need to do some kind of Form where when a button is pressed, it processes the following command
mailto:<to email>?cc=<cc email>&bcc=<bcc mail>&subject=<subject text>&body=<body text>
and that would open a new ms outlook e-mail that I need to contain those listed e-mails in the BCC field.

Any help on that?
LVL 3
mte01Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Scott McDaniel (Microsoft Access MVP - EE MVE )Infotrakker SoftwareCommented:
I don't think you can add that many recipients to an email in any of the "send to" fields. From what I can gather, about 50 - 70 is the maximum number you could add.

If you want to try it, however, just do this:

Dim bcc As String
Dim rst As DAO.Recordset
Set rst = Currentdb.OpenRecordset("SELECT * FROM YourQueryName")

Do Until rst.EOF
  bcc = bcc & rst("YourEmailField") & ";"
  rst.MoveNext
Loop

Now create your email. You can use SendObject for that:

DoCmd.SEndObject acSendNoObject, , , "someone@somewhere.com", , bcc, "Your Subject", "Your Body", True

You can also use Outlook Automation to do this, which is generally a better idea with things of this nature. The link below has an example of doing that.

MSDN SendObject article: https://msdn.microsoft.com/en-us/library/office/ff197046.aspx

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
mte01Author Commented:
Yep Scott, what happened is that I did the research myself, and did it almost exactly like you had outlined it (just before you commented on my question); many thanks for your help!!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.