Discussion Locked

Email address from an Access Database

0 helpful
12 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Is there anyway to select address to email an Outlook message to by running a query on an Access Database table that contains a field of email addresses?

For example, I have a table of student information which include their email addresses. Iwant to send an email to all students whose GPA is < 2.0. I have no problem running a query to get a list email addresses for those < 2.0 GPA. But how can I make this list of email addresses my TO: field in Outlook?

12 replies

by zalog

If you also have Microsoft Word you can use the Mail Merge feature. Within Word select Tools, Mail Merge from the menu. Create a form letter as your email message. Use your Access databse as the data source at the get data command button. Here you will be able to select a table or a query. Finally choose merge, merge to Electronic mail, and click the setup button. Select the field with the email address and provide a subject line. Now when you meger your doucument it will send an email to each person in the table or query.

by heepeq

Try to read SendObject Action and Method description.
The usfulness of this solution is limited to sending only Access objects.
Technically speaking you walk through the each record creating string with list of addressees, separated with semicolons.
If you want to send more customized text message, use general MAPI (Microsoft Mail API) function calls.

by zlatin zlatev

You can use MAPISession and MAPIMessages ActiveX controls to add "send/recieve emails" functionality to your Access application (they will be send/recieved via Outlook/Exchange server)
For more info see the MSDN library online:
http://msdn.microsoft.com/library/devprods/vs6/vbasic/mapi98/vbobjmapim.htm
http://msdn.microsoft.com/library/devprods/vs6/vbasic/mapi98/vbobjmapis.htm

Or feel free to ask me for further assistance

Regards,
Zlatin Zlatev,
MCP Implementing ... Sql Server 7.0 (70-029),
Software Enfineer & Programmer Mentor,
JEI-Bulgaria

by zlatin zlatev

In the addresses above there is NO space between ".../vbasic/ma" and "pi98/..."
It should read ".../vbasic/mapi98/..."
Sorry for inconvenience but it looks like a TechRepublic problem (I've seen it in other messages)

This discussion is closed to new replies.