How do I send an e-mail to a contact in an Access data base

G

Gemfish

I have a data base of contacts with one of the fields containing their e-mail
addresses, I would like to click on the e-mail address field in a form and
have outlook send an e-mail to them, how do I do this.

Thanks in anticipation of your help
 
O

Ofer

On on click event use the SendObject to send mail.

docmd.SendObject acSendNoObject,,,me.sendToEMailField,,,"Subject","Text"
 
G

Gemfish

Thanks, now it is saying that the macro docmd cannot be found, The macro (por
its macro group) doesn't exist, or hte macro is new but hasn't been saved.

Help!!!

Gemfish
 
O

Ofer

You probably typed the docmd line in the on the line of the click event of
the field, you should put in in the code section.
 
G

Gemfish

I'm sorry to be so stupid about it, where does it go in the code section?

Gemfish
 
R

Rick Brandt

Gemfish said:
I'm sorry to be so stupid about it, where does it go in the code
section?

In the event property enter "[Event Procedure]" which is second in the drop-down
list of choices. Then click the builder button to the right [...]. That will
open the code window and will pre-position your cursor where the code needs to
be entered.
 
G

Gemfish

Thanks, now I get a compile error: method or data member not found the
debugger highlights .sendToEMailfield,

Any ideas?

Gemfish

Rick Brandt said:
Gemfish said:
I'm sorry to be so stupid about it, where does it go in the code
section?

In the event property enter "[Event Procedure]" which is second in the drop-down
list of choices. Then click the builder button to the right [...]. That will
open the code window and will pre-position your cursor where the code needs to
be entered.
 
O

Ofer

Can you post the entire row in the code
Wnem I sent me.sendToEMailfield it mean that you need to write the name of
your field in the command line "Me" stand for the current form and after that
you need to write the name of the field that contain the address

Gemfish said:
Thanks, now I get a compile error: method or data member not found the
debugger highlights How do I send an e-mail to a contact in an Access data base,

Any ideas?

Gemfish

Rick Brandt said:
Gemfish said:
I'm sorry to be so stupid about it, where does it go in the code
section?

In the event property enter "[Event Procedure]" which is second in the drop-down
list of choices. Then click the builder button to the right [...]. That will
open the code window and will pre-position your cursor where the code needs to
be entered.
 
G

Gemfish

Thank you so much it now works.

Gemfish

Ofer said:
Can you post the entire row in the code
Wnem I sent me.sendToEMailfield it mean that you need to write the name of
your field in the command line "Me" stand for the current form and after that
you need to write the name of the field that contain the address

Gemfish said:
Thanks, now I get a compile error: method or data member not found the
debugger highlights How do I send an e-mail to a contact in an Access data base,

Any ideas?

Gemfish

Rick Brandt said:
Gemfish wrote:
I'm sorry to be so stupid about it, where does it go in the code
section?

In the event property enter "[Event Procedure]" which is second in the drop-down
list of choices. Then click the builder button to the right [...]. That will
open the code window and will pre-position your cursor where the code needs to
be entered.
 
K

KLP

Is it possible to send e-mail to a group of contacts from Access? In the
contact info, I have e-mail and thanks to the info provided here, I can
double-click on an address and send an e-mail from Access; but what if I want
to send an e-mail to all the contacts?
 
Top