Connecting Tech Pros Worldwide Forums | Help | Site Map

Sendin emails through Microsoft Access

acni
Guest
 
Posts: n/a
#1: Nov 13 '05
I've been trawling through the internet to find out how to send emails to
selected email addresses in access but cant seem to find anything.ive a
database that im workin on with name address etc etc.there is a tick box
beside each person and im wantin to select a number of people and send
them the same message.i want outlook to open a new email.was wonderin is
this possible and if so how do you do this?

Thanks

Neil


jason.foster@morganstanley.com
Guest
 
Posts: n/a
#2: Nov 13 '05

re: Sendin emails through Microsoft Access


Assuming the "Names" are in a database, go into design view, click on
the names field, and under general click Smart Tags. The smart tag you
want is "Person Name".

Save and open table and then next to each name, you'll have an Icon
appear that will give you all the options you need for this.

TheJavster
Guest
 
Posts: n/a
#3: Nov 13 '05

re: Sendin emails through Microsoft Access


Sending an email from Access is done easily via the SendObject method, as in
the following example:

DoCmd.SendObject acSendNoObject, , , johndoe@spamthis.com, , , "Message
Subject Here", "Message Body Here"

That will open up a new email message with the above recipient. Now, if you
want to send to a group of people, you need to clarify if you want to get
the list of people directly from a table, or from a form you're looking at.
From a table, you would simply open a recordset, step through each record,
and pass the email to a string like so:

Do while not recsetAddress.Eof
strTo = strTo & "; " & recsetAddress.email
recsetAddress.MoveNext
Loop

strTo = Mid(strTo, 2)

Then, you can pass the strTo variable to the fourth argument of the
SendObject method (e.g: the "TO").

If you're using a form, well, that gets a bit more complicated, and you'll
have to step through records within the form. Let me know if you need to do
this, and I'll pull some code up and post if for you.

Hope that helps some.

JV

"acni" <nboal@artscouncil-ni.org> wrote in message
news:4beec13d18f35996a2b158197deb4dee@localhost.ta lkaboutdatabases.com...[color=blue]
> I've been trawling through the internet to find out how to send emails to
> selected email addresses in access but cant seem to find anything.ive a
> database that im workin on with name address etc etc.there is a tick box
> beside each person and im wantin to select a number of people and send
> them the same message.i want outlook to open a new email.was wonderin is
> this possible and if so how do you do this?
>
> Thanks
>
> Neil
>[/color]


acni
Guest
 
Posts: n/a
#4: Nov 13 '05

re: Sendin emails through Microsoft Access


unfortunately Javster ive to do the more complex one so if you could do
that it would be very much appreciated.thanks man

Closed Thread