Open outlook by doubleclicking a text box

  • Thread starter Thread starter Today
  • Start date Start date
T

Today

I want to double click a text box, containing an email
address, in a form set to continuous records, and have MS
Outlook open up a new email with that specific record's
email address in the To: line.

Any help would be appreciated. Thanks.
 
Hi Today

You are probably best just to use the default mail transport, either via
SendObject or FollowHyperlink:

Private Sub EmailAddress_DblClick(Cancel as integer)
If Len(EmailAddress.Text) > 0 then
'either this:
docmd.SendObject To:=EmailAddress.Text
'or this:
application.FollowHyperlink "mailto:" & EmailAddress.Text
Else
Msgbox "No email address"
End If
End Sub

Both methods will produce the same result, except that SendObject will raise
an error if the user cancels the message without sending it. If you're not
interested in trapping such a situation, then use FollowHyperlink.

--
Good Luck!
Graham Mandeno [Access MVP]
Auckland, New Zealand

Return mail address is invalid in a vain attempt to reduce spam.
Feedback is welcome at: (e-mail address removed)
Please post new questions or followups to newsgroup.
 
Back
Top