Mail from Access 97 form

S

Sid

How is the simplest way to have Access open my Outlook Express
and paste an email address from a control on my form?
I tried using "Mailto", but I'm not sure how to send the control's contents.

The DoCmd.SendObject example I tried:
----------------------------
Dim strEmail As String
Dim strSubject As String
Dim strText as String

strEmail = <youremailaddress.com>
strSubject = "Subject text"
strText = "Whatever text you want in the email message"

DoCmd.SendObject acSendNoObject, , , strEmail, , ,
strSubject, strText, True
 
S

Steve Schapel

Sidney,

I am not sure what you are referring to with
strEmail = <youremailaddress.com>
If you want to refer to a specific email address, it will need to be a
valid email syntax, and enclosed in ""s, e.g.
strEmail = "(e-mail address removed)"
If, as you first requested, you are trying to refer to the value of a
control on a form, assuming it is the same form as the code is called
from, I think this will work...
strEmail = Me.NameOfTextbox
 
S

Sid

That sample code was from another posting. But I think the
strEmail=Me![MyControlName]. And the strEmail is supposed to be any email
address from my form, and its supposed to be placed in the "To:" line of my
email client.
 

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