Emailing from Access 2003

P

Pic

I have a simple database that contains only contact information. I'd
like to add a button to the input form that will invoke Outlook or
Outlook express and open a new email to the current contact. Is there
a simple way to do this? I've read elsewhere on this list that you can
add "MailTo:" to the email address field to get the same result, but
it would be cumbersome for my client to have to type that in every
time he adds a new contact to the database.

Thanks in advance for any advice.

Pic
 
D

Douglas J. Steele

You can use the FollowHyperlink method.

Assuming the e-mail is stored in variable strEmail, you can use:

Application.FollowHyperlink "mailto:" & strEmail
 
D

Dirk Goldgar

Douglas J. Steele said:
You can use the FollowHyperlink method.

Assuming the e-mail is stored in variable strEmail, you can use:

Application.FollowHyperlink "mailto:" & strEmail


Why not use SendObject, Doug?
 
D

Douglas J. Steele

Dirk Goldgar said:
Why not use SendObject, Doug?

I got the impression that all they wanted was to open the e-mail client with
the address filled in, so SendObject seemed overkill.

And, to be honest, SendObject didn't work in our environment (we use Lotus
Notes), whereas FollowHyperlink did.
 
D

Dirk Goldgar

Douglas J. Steele said:
I got the impression that all they wanted was to open the e-mail client
with the address filled in, so SendObject seemed overkill.

That's reasonable. They may want more control of the message later, in
which case SendObject may be better. Although you *can* set up more
elaborate mailto: hyperlinks that specify other message fields.
And, to be honest, SendObject didn't work in our environment (we use Lotus
Notes), whereas FollowHyperlink did.

I've heard about problems with Lotus Notes -- not MAPI compliant? -- but I
didn't think of that.
 
E

ericwalton

Hello -

I need to do the same thing as Pic however since I am a newer user of the
software I am not understanding exactly how to use the method described
below.

Where do I need to add the 'Application.FollowHyperlink "mailto:" &
strEmail' command?

What I would like to do is have the e-mail link populate a field in a form
immediately after the user chooses the support staff member's name from a
drop down in the previous field.
I have the e-mail field set up as a "hyperlink" in the in the support staff
table. Since the form isn't based on / connected to the support staff table,
I am using the DLOOKUP command to have the field in one of my forms look up
the e-mail address when it is entered in a previous field in the same form.

I'm having 2 problems:

1. I can't get the e-mail field to refresh until after I close the form and
re-open it.
2. After the e-mail field refreshes, it doens't appear as a link that you
can click on to invoke a new e-mail from Outlook.

Thanks for your help!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top