How do I send an email

S

Stapes

Hi

I have a database which holds email addresses. Is there any way I can
set it up s0 that, if the user double-clicks on the email address,
outlook opens with a blank email addressed to the given email address?

Stapes
 
D

Douglas J. Steele

Assuming the email address is in a variable strEmail, try:

Application.Followhyperlink "mailto:" & strEmail
 
B

BruceM

In the double-click event of the control containing the e-mail address you
could do something like:
Dim strCC as String, strSubj as String, strMsg as String
strCC = [email protected]
strSubj = "Message Subject"
strMsg = "Message text"
DoCmd.SendObject, , , ,strCC, , strSubj,strMsg
[Email] is the field containing the e-mail address. See Help for more
information about SendObject.
 
B

BruceM

The method I described may open the e-mail program in a very small window,
while the method Douglas described does not have that effect, as I recall.
Having said that, strCC needs quotes if you use SendObject:
strCC = "[email protected]"

BruceM said:
In the double-click event of the control containing the e-mail address you
could do something like:
Dim strCC as String, strSubj as String, strMsg as String
strCC = [email protected]
strSubj = "Message Subject"
strMsg = "Message text"
DoCmd.SendObject, , , ,strCC, , strSubj,strMsg
[Email] is the field containing the e-mail address. See Help for more
information about SendObject.

[QUOTE="Stapes"]
Hi

I have a database which holds email addresses. Is there any way I can
set it up s0 that, if the user double-clicks on the email address,
outlook opens with a blank email addressed to the given email address?

Stapes[/QUOTE]
[/QUOTE]
 
Top