View Full Version : Opening Outlook to send an e-mail from the form


ptaylor-west
09-10-2001, 03:10 AM
How do you set up the property for a field that contains an e-mail address so that it will open up outlook automatically and enter the e-mail address in the send to box - I have tried hyperlink but this will only work for web sites and also by creating a hyperlink/e-mail field but this has to have a dedicated e-mail address

John.Woody
09-10-2001, 04:34 AM
For this to work you must have outlook set as your email program in the internet properties.
Create the email field in your table as a text field and then put the field on the form.

Create an event procedure on that field on click or double click as below where Me.Cust_Email is the field name.

Dim StrInput As String

StrInput = "mailto:" & Me.Cust_Email

Application.FollowHyperlink StrInput, , True

BukHix
09-10-2001, 04:54 AM
This thread shows an alternative method to using the hyper links. I have never used them but I hear they are a mixed bag of results.

Topic: Email a Report Using a Command Button (http://www.access-programmers.co.uk/ubb/Forum7/HTML/000782.html)

Post back if you do have more questions.

[This message has been edited by BukHix (edited 09-10-2001).]

ptaylor-west
09-10-2001, 05:00 AM
Thanks John your solution was absolutely spot on.

BukHix
09-10-2001, 05:12 AM
Ok I'll admit it, the thread I sent you to was for sending a report through email (I picked the wrong thread) but I believe the SendObject is still a better method then the HyperLink.

Anyway, gald you got it working! http://www.access-programmers.co.uk/ubb/smile.gif