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

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
On on click event use the SendObject to send mail.

docmd.SendObject acSendNoObject,,,me.sendToEMailField,,,"Subject","Text"
 
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
 
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.
 
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.
 
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.
 
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.
 
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.
 
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?
 
Back
Top