Use Access to Create Email to Multiple Recipients

mikeTTI

Registered User.
Local time
Tomorrow, 00:16
Joined
Oct 7, 2007
Messages
41
Hi,

I'm not sure which Form topic this post should go under ...

I have an Access Database which contains contact information including email addresses in a number of tables. Each table is a reference group of individuals interested in a particular topic and has three fields (contactID, name and Email). All tables relate back to a master address list.

This allows me to have different (or multiple) people from within the same master address as contact persons for different reference groups. When I am doing labels, or printed reports for labelling I simply combine the address from the master list with the conact from the reference group list.

I would like to be able to replicate this approach for e-mail messages.

Ideally the databse would create distribution lists and export these to outlook global address list where they would be available to all users.

Alternately, I would write a module that automatically generates a new email message with all the Email Address entries from a user selected table in the To: field. The user would then edit the email message and press send.

It seems to me that eitehr way I will need to somehow concatenate all emails addresses in a table into a list separated by semi-colons.
 
Simple Software Solutions

Hi

From previous experiences of performing this task, my solution was to designate a To:email addressee and CC all the remaining addressees.

Once you have got your recordset of the addressees and their email addresses perform a loop on the recordcount, such as:

In this example the first record in the recordset is the TO and the remainder are the CC's

Dim strTo as String
Dim strCC as string

strTo = Rs("EmailAddress")
Rs.MoveNext

Do Until Rs.EOF

strCC = strCC & Rs("EmailAddress") & ";"

Rs.MoveNext​
Loop

Rs.Close

'Then strip off the last semi-colon
strCC = left(strCC,Len(strCC)-1)


Next use Office Automation to export the To: and cc: to Outlook with the relevant attachment, Subject and Body

The To:Addressee would then eyeball the email and then send

Be aware that if an email address is not present in your contacts list or is an invalid email address it may kick it out. So you could be realy fancy and get the routine to add the recipients to Outlook also.


Code Master::cool:
 

Users who are viewing this thread

Back
Top Bottom